From 95e835a9023af4f6eb390c8530375e4ea3e19255 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Wed, 23 Nov 2022 19:08:42 +0200 Subject: [PATCH 01/94] Deprecated Usage stats --- app/controllers/api/account.php | 31 - app/controllers/api/databases.php | 569 ++++++++---------- app/controllers/api/functions.php | 331 +++++----- app/controllers/api/project.php | 156 ++--- app/controllers/api/storage.php | 347 +++++------ app/controllers/api/users.php | 182 +++--- app/controllers/shared/api.php | 89 ++- app/init.php | 28 - app/workers/builds.php | 25 +- app/workers/functions.php | 23 +- composer.lock | 2 +- src/Appwrite/Platform/Tasks/Usage.php | 46 +- src/Appwrite/Usage/Calculator.php | 15 - src/Appwrite/Usage/Calculators/TimeSeries.php | 557 ----------------- src/Appwrite/Usage/Stats.php | 225 ------- 15 files changed, 811 insertions(+), 1815 deletions(-) delete mode 100644 src/Appwrite/Usage/Calculator.php delete mode 100644 src/Appwrite/Usage/Calculators/TimeSeries.php delete mode 100644 src/Appwrite/Usage/Stats.php diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index d973ffd14..e528d5957 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -53,7 +53,6 @@ App::post('/v1/account') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', []) ->label('sdk.namespace', 'account') ->label('sdk.method', 'create') @@ -147,8 +146,6 @@ App::post('/v1/account/sessions/email') ->label('audits.event', 'session.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('usage.metric', 'sessions.{scope}.requests.create') - ->label('usage.params', ['provider:email']) ->label('sdk.auth', []) ->label('sdk.namespace', 'account') ->label('sdk.method', 'createEmailSession') @@ -375,8 +372,6 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') ->label('abuse-limit', 50) ->label('abuse-key', 'ip:{ip}') ->label('docs', false) - ->label('usage.metric', 'sessions.{scope}.requests.create') - ->label('usage.params', ['provider:{request.provider}']) ->param('provider', '', new WhiteList(\array_keys(Config::getParam('providers')), true), 'OAuth2 provider.') ->param('code', '', new Text(2048), 'OAuth2 code.') ->param('state', '', new Text(2048), 'OAuth2 state params.', true) @@ -748,8 +743,6 @@ App::put('/v1/account/sessions/magic-url') ->label('audits.event', 'session.update') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('usage.metric', 'sessions.{scope}.requests.create') - ->label('usage.params', ['provider:magic-url']) ->label('sdk.auth', []) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateMagicURLSession') @@ -987,8 +980,6 @@ App::put('/v1/account/sessions/phone') ->groups(['api', 'account']) ->label('scope', 'public') ->label('event', 'users.[userId].sessions.[sessionId].create') - ->label('usage.metric', 'sessions.{scope}.requests.create') - ->label('usage.params', ['provider:phone']) ->label('sdk.auth', []) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updatePhoneSession') @@ -1106,8 +1097,6 @@ App::post('/v1/account/sessions/anonymous') ->label('audits.event', 'session.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('usage.metric', 'sessions.{scope}.requests.create') - ->label('usage.params', ['provider:anonymous']) ->label('sdk.auth', []) ->label('sdk.namespace', 'account') ->label('sdk.method', 'createAnonymousSession') @@ -1282,7 +1271,6 @@ App::get('/v1/account') ->desc('Get Account') ->groups(['api', 'account']) ->label('scope', 'account') - ->label('usage.metric', 'users.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'get') @@ -1301,7 +1289,6 @@ App::get('/v1/account/prefs') ->desc('Get Account Preferences') ->groups(['api', 'account']) ->label('scope', 'account') - ->label('usage.metric', 'users.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'getPrefs') @@ -1322,7 +1309,6 @@ App::get('/v1/account/sessions') ->desc('List Sessions') ->groups(['api', 'account']) ->label('scope', 'account') - ->label('usage.metric', 'users.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'listSessions') @@ -1359,7 +1345,6 @@ App::get('/v1/account/logs') ->desc('List Logs') ->groups(['api', 'account']) ->label('scope', 'account') - ->label('usage.metric', 'users.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'listLogs') @@ -1420,7 +1405,6 @@ App::get('/v1/account/sessions/:sessionId') ->desc('Get Session') ->groups(['api', 'account']) ->label('scope', 'account') - ->label('usage.metric', 'users.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'getSession') @@ -1466,7 +1450,6 @@ App::patch('/v1/account/name') ->label('scope', 'account') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateName') @@ -1498,7 +1481,6 @@ App::patch('/v1/account/password') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updatePassword') @@ -1537,7 +1519,6 @@ App::patch('/v1/account/email') ->label('scope', 'account') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateEmail') @@ -1589,7 +1570,6 @@ App::patch('/v1/account/phone') ->label('scope', 'account') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updatePhone') @@ -1637,7 +1617,6 @@ App::patch('/v1/account/prefs') ->label('scope', 'account') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updatePrefs') @@ -1666,7 +1645,6 @@ App::patch('/v1/account/status') ->label('scope', 'account') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.delete') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateStatus') @@ -1701,7 +1679,6 @@ App::delete('/v1/account/sessions/:sessionId') ->label('event', 'users.[userId].sessions.[sessionId].delete') ->label('audits.event', 'session.delete') ->label('audits.resource', 'user/{user.$id}') - ->label('usage.metric', 'sessions.{scope}.requests.delete') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'deleteSession') @@ -1775,7 +1752,6 @@ App::patch('/v1/account/sessions/:sessionId') ->label('audits.event', 'session.update') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('usage.metric', 'sessions.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateSession') @@ -1860,7 +1836,6 @@ App::delete('/v1/account/sessions') ->label('event', 'users.[userId].sessions.[sessionId].delete') ->label('audits.event', 'session.delete') ->label('audits.resource', 'user/{user.$id}') - ->label('usage.metric', 'sessions.{scope}.requests.delete') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'deleteSessions') @@ -1922,7 +1897,6 @@ App::post('/v1/account/recovery') ->label('audits.event', 'recovery.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'createRecovery') @@ -2029,7 +2003,6 @@ App::put('/v1/account/recovery') ->label('audits.event', 'recovery.update') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateRecovery') @@ -2097,7 +2070,6 @@ App::post('/v1/account/verification') ->label('event', 'users.[userId].verification.[tokenId].create') ->label('audits.event', 'verification.create') ->label('audits.resource', 'user/{response.userId}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'createVerification') @@ -2187,7 +2159,6 @@ App::put('/v1/account/verification') ->label('event', 'users.[userId].verification.[tokenId].update') ->label('audits.event', 'verification.update') ->label('audits.resource', 'user/{response.userId}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateVerification') @@ -2246,7 +2217,6 @@ App::post('/v1/account/verification/phone') ->label('event', 'users.[userId].verification.[tokenId].create') ->label('audits.event', 'verification.create') ->label('audits.resource', 'user/{response.userId}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'createPhoneVerification') @@ -2331,7 +2301,6 @@ App::put('/v1/account/verification/phone') ->label('event', 'users.[userId].verification.[tokenId].update') ->label('audits.event', 'verification.update') ->label('audits.resource', 'user/{response.userId}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'updatePhoneVerification') diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 5022681d8..b3e8196cc 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -154,7 +154,6 @@ App::post('/v1/databases') ->label('scope', 'databases.write') ->label('audits.event', 'database.create') ->label('audits.resource', 'database/{response.$id}') - ->label('usage.metric', 'databases.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'create') @@ -226,7 +225,6 @@ App::get('/v1/databases') ->desc('List Databases') ->groups(['api', 'database']) ->label('scope', 'databases.read') - ->label('usage.metric', 'databases.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'list') @@ -273,7 +271,6 @@ App::get('/v1/databases/:databaseId') ->desc('Get Database') ->groups(['api', 'database']) ->label('scope', 'databases.read') - ->label('usage.metric', 'databases.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'get') @@ -388,7 +385,6 @@ App::put('/v1/databases/:databaseId') ->label('event', 'databases.[databaseId].update') ->label('audits.event', 'database.update') ->label('audits.resource', 'database/{response.$id}') - ->label('usage.metric', 'databases.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'update') @@ -431,7 +427,6 @@ App::delete('/v1/databases/:databaseId') ->label('event', 'databases.[databaseId].delete') ->label('audits.event', 'database.delete') ->label('audits.resource', 'database/{request.databaseId}') - ->label('usage.metric', 'databases.{scope}.requests.delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'delete') @@ -478,8 +473,6 @@ App::post('/v1/databases/:databaseId/collections') ->label('scope', 'collections.write') ->label('audits.event', 'collection.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{response.$id}') - ->label('usage.metric', 'collections.{scope}.requests.create') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'createCollection') @@ -543,8 +536,6 @@ App::get('/v1/databases/:databaseId/collections') ->desc('List Collections') ->groups(['api', 'database']) ->label('scope', 'collections.read') - ->label('usage.metric', 'collections.{scope}.requests.read') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'listCollections') @@ -599,8 +590,6 @@ App::get('/v1/databases/:databaseId/collections/:collectionId') ->desc('Get Collection') ->groups(['api', 'database']) ->label('scope', 'collections.read') - ->label('usage.metric', 'collections.{scope}.requests.read') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'getCollection') @@ -634,8 +623,6 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/logs') ->desc('List Collection Logs') ->groups(['api', 'database']) ->label('scope', 'collections.read') - ->label('usage.metric', 'collections.{scope}.requests.read') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'listCollectionLogs') @@ -733,8 +720,6 @@ App::put('/v1/databases/:databaseId/collections/:collectionId') ->label('event', 'databases.[databaseId].collections.[collectionId].update') ->label('audits.event', 'collection.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('usage.metric', 'collections.{scope}.requests.update') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'updateCollection') @@ -801,8 +786,6 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId') ->label('event', 'databases.[databaseId].collections.[collectionId].delete') ->label('audits.event', 'collection.delete') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('usage.metric', 'collections.{scope}.requests.delete') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'deleteCollection') @@ -858,8 +841,6 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('usage.metric', 'collections.{scope}.requests.update') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'createStringAttribute') @@ -908,8 +889,6 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/email' ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('usage.metric', 'collections.{scope}.requests.update') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createEmailAttribute') @@ -952,8 +931,6 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/enum') ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('usage.metric', 'collections.{scope}.requests.update') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createEnumAttribute') @@ -1012,8 +989,6 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/ip') ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('usage.metric', 'collections.{scope}.requests.update') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createIpAttribute') @@ -1056,8 +1031,6 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/url') ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('usage.metric', 'collections.{scope}.requests.update') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createUrlAttribute') @@ -1100,8 +1073,6 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/intege ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('usage.metric', 'collections.{scope}.requests.update') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createIntegerAttribute') @@ -1173,8 +1144,6 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/float' ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('usage.metric', 'collections.{scope}.requests.update') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createFloatAttribute') @@ -1249,8 +1218,6 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/boolea ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('usage.metric', 'collections.{scope}.requests.update') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createBooleanAttribute') @@ -1293,8 +1260,6 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/dateti ->label('scope', 'collections.write') ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('usage.metric', 'collections.{scope}.requests.update') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createDatetimeAttribute') @@ -1335,8 +1300,6 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes') ->desc('List Attributes') ->groups(['api', 'database']) ->label('scope', 'collections.read') - ->label('usage.metric', 'collections.{scope}.requests.read') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'listAttributes') @@ -1374,8 +1337,6 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes/:key') ->desc('Get Attribute') ->groups(['api', 'database']) ->label('scope', 'collections.read') - ->label('usage.metric', 'collections.{scope}.requests.read') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'getAttribute') @@ -1448,8 +1409,6 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/attributes/:key ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].delete') ->label('audits.event', 'attribute.delete') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('usage.metric', 'collections.{scope}.requests.update') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'deleteAttribute') @@ -1536,8 +1495,6 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes') ->label('scope', 'collections.write') ->label('audits.event', 'index.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('usage.metric', 'collections.{scope}.requests.update') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'createIndex') @@ -1683,8 +1640,6 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes') ->desc('List Indexes') ->groups(['api', 'database']) ->label('scope', 'collections.read') - ->label('usage.metric', 'collections.{scope}.requests.read') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'listIndexes') @@ -1722,8 +1677,6 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes/:key') ->desc('Get Index') ->groups(['api', 'database']) ->label('scope', 'collections.read') - ->label('usage.metric', 'collections.{scope}.requests.read') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'getIndex') @@ -1773,8 +1726,6 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/indexes/:key') ->label('event', 'databases.[databaseId].collections.[collectionId].indexes.[indexId].delete') ->label('audits.event', 'index.delete') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('usage.metric', 'collections.{scope}.requests.update') - ->label('usage.params', ['databaseId:{request.databaseId}']) ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'deleteIndex') @@ -1841,8 +1792,6 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') ->label('scope', 'documents.write') ->label('audits.event', 'document.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') - ->label('usage.metric', 'documents.{scope}.requests.create') - ->label('usage.params', ['databaseId:{request.databaseId}', 'collectionId:{request.collectionId}']) ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) @@ -1966,8 +1915,6 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents') ->desc('List Documents') ->groups(['api', 'database']) ->label('scope', 'documents.read') - ->label('usage.metric', 'documents.{scope}.requests.read') - ->label('usage.params', ['databaseId:{request.databaseId}', 'collectionId:{request.collectionId}']) ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'listDocuments') @@ -2063,8 +2010,6 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen ->desc('Get Document') ->groups(['api', 'database']) ->label('scope', 'documents.read') - ->label('usage.metric', 'documents.{scope}.requests.read') - ->label('usage.params', ['databaseId:{request.databaseId}', 'collectionId:{request.collectionId}']) ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'getDocument') @@ -2125,8 +2070,6 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen ->desc('List Document Logs') ->groups(['api', 'database']) ->label('scope', 'documents.read') - ->label('usage.metric', 'documents.{scope}.requests.read') - ->label('usage.params', ['databaseId:{request.databaseId}', 'collectionId:{request.collectionId}']) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'listDocumentLogs') @@ -2229,8 +2172,6 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum ->label('scope', 'documents.write') ->label('audits.event', 'document.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}/document/{response.$id}') - ->label('usage.metric', 'documents.{scope}.requests.update') - ->label('usage.params', ['databaseId:{request.databaseId}', 'collectionId:{request.collectionId}']) ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) @@ -2363,8 +2304,6 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].delete') ->label('audits.event', 'document.delete') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}/document/{request.documentId}') - ->label('usage.metric', 'documents.{scope}.requests.delete') - ->label('usage.params', ['databaseId:{request.databaseId}', 'collectionId:{request.collectionId}']) ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) @@ -2462,107 +2401,107 @@ App::get('/v1/databases/usage') ->inject('dbForProject') ->action(function (string $range, Response $response, Database $dbForProject) { - $usage = []; - if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { - $periods = [ - '24h' => [ - 'period' => '1h', - 'limit' => 24, - ], - '7d' => [ - 'period' => '1d', - 'limit' => 7, - ], - '30d' => [ - 'period' => '1d', - 'limit' => 30, - ], - '90d' => [ - 'period' => '1d', - 'limit' => 90, - ], - ]; + // $usage = []; + // if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + // $periods = [ + // '24h' => [ + // 'period' => '1h', + // 'limit' => 24, + // ], + // '7d' => [ + // 'period' => '1d', + // 'limit' => 7, + // ], + // '30d' => [ + // 'period' => '1d', + // 'limit' => 30, + // ], + // '90d' => [ + // 'period' => '1d', + // 'limit' => 90, + // ], + // ]; - $metrics = [ - 'databases.$all.count.total', - 'documents.$all.count.total', - 'collections.$all.count.total', - 'databases.$all.requests.create', - 'databases.$all.requests.read', - 'databases.$all.requests.update', - 'databases.$all.requests.delete', - 'collections.$all.requests.create', - 'collections.$all.requests.read', - 'collections.$all.requests.update', - 'collections.$all.requests.delete', - 'documents.$all.requests.create', - 'documents.$all.requests.read', - 'documents.$all.requests.update', - 'documents.$all.requests.delete' - ]; + // $metrics = [ + // 'databases.$all.count.total', + // 'documents.$all.count.total', + // 'collections.$all.count.total', + // 'databases.$all.requests.create', + // 'databases.$all.requests.read', + // 'databases.$all.requests.update', + // 'databases.$all.requests.delete', + // 'collections.$all.requests.create', + // 'collections.$all.requests.read', + // 'collections.$all.requests.update', + // 'collections.$all.requests.delete', + // 'documents.$all.requests.create', + // 'documents.$all.requests.read', + // 'documents.$all.requests.update', + // 'documents.$all.requests.delete' + // ]; - $stats = []; + // $stats = []; - Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $periods[$range]['limit']; - $period = $periods[$range]['period']; + // Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + // foreach ($metrics as $metric) { + // $limit = $periods[$range]['limit']; + // $period = $periods[$range]['period']; - $requestDocs = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); + // $requestDocs = $dbForProject->find('stats', [ + // Query::equal('period', [$period]), + // Query::equal('metric', [$metric]), + // Query::limit($limit), + // Query::orderDesc('time'), + // ]); - $stats[$metric] = []; - foreach ($requestDocs as $requestDoc) { - $stats[$metric][] = [ - 'value' => $requestDoc->getAttribute('value'), - 'date' => $requestDoc->getAttribute('time'), - ]; - } + // $stats[$metric] = []; + // foreach ($requestDocs as $requestDoc) { + // $stats[$metric][] = [ + // 'value' => $requestDoc->getAttribute('value'), + // 'date' => $requestDoc->getAttribute('time'), + // ]; + // } - // backfill metrics with empty values for graphs - $backfill = $limit - \count($requestDocs); - while ($backfill > 0) { - $last = $limit - $backfill - 1; // array index of last added metric - $diff = match ($period) { // convert period to seconds for unix timestamp math - '1h' => 3600, - '1d' => 86400, - }; - $stats[$metric][] = [ - 'value' => 0, - 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), - ]; - $backfill--; - } - // Added 3'rd level to Index [period, metric, time] because of order by. - $stats[$metric] = array_reverse($stats[$metric]); - } - }); + // // backfill metrics with empty values for graphs + // $backfill = $limit - \count($requestDocs); + // while ($backfill > 0) { + // $last = $limit - $backfill - 1; // array index of last added metric + // $diff = match ($period) { // convert period to seconds for unix timestamp math + // '1h' => 3600, + // '1d' => 86400, + // }; + // $stats[$metric][] = [ + // 'value' => 0, + // 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + // ]; + // $backfill--; + // } + // // Added 3'rd level to Index [period, metric, time] because of order by. + // $stats[$metric] = array_reverse($stats[$metric]); + // } + // }); - $usage = new Document([ - 'range' => $range, - 'databasesCount' => $stats['databases.$all.count.total'] ?? [], - 'documentsCount' => $stats['documents.$all.count.total'] ?? [], - 'collectionsCount' => $stats['collections.$all.count.total'] ?? [], - 'documentsCreate' => $stats['documents.$all.requests.create'] ?? [], - 'documentsRead' => $stats['documents.$all.requests.read'] ?? [], - 'documentsUpdate' => $stats['documents.$all.requests.update'] ?? [], - 'documentsDelete' => $stats['documents.$all.requests.delete'] ?? [], - 'collectionsCreate' => $stats['collections.$all.requests.create'] ?? [], - 'collectionsRead' => $stats['collections.$all.requests.read'] ?? [], - 'collectionsUpdate' => $stats['collections.$all.requests.update'] ?? [], - 'collectionsDelete' => $stats['collections.$all.requests.delete'] ?? [], - 'databasesCreate' => $stats['databases.$all.requests.create'] ?? [], - 'databasesRead' => $stats['databases.$all.requests.read'] ?? [], - 'databasesUpdate' => $stats['databases.$all.requests.update'] ?? [], - 'databasesDelete' => $stats['databases.$all.requests.delete'] ?? [], - ]); - } + // $usage = new Document([ + // 'range' => $range, + // 'databasesCount' => $stats['databases.$all.count.total'] ?? [], + // 'documentsCount' => $stats['documents.$all.count.total'] ?? [], + // 'collectionsCount' => $stats['collections.$all.count.total'] ?? [], + // 'documentsCreate' => $stats['documents.$all.requests.create'] ?? [], + // 'documentsRead' => $stats['documents.$all.requests.read'] ?? [], + // 'documentsUpdate' => $stats['documents.$all.requests.update'] ?? [], + // 'documentsDelete' => $stats['documents.$all.requests.delete'] ?? [], + // 'collectionsCreate' => $stats['collections.$all.requests.create'] ?? [], + // 'collectionsRead' => $stats['collections.$all.requests.read'] ?? [], + // 'collectionsUpdate' => $stats['collections.$all.requests.update'] ?? [], + // 'collectionsDelete' => $stats['collections.$all.requests.delete'] ?? [], + // 'databasesCreate' => $stats['databases.$all.requests.create'] ?? [], + // 'databasesRead' => $stats['databases.$all.requests.read'] ?? [], + // 'databasesUpdate' => $stats['databases.$all.requests.update'] ?? [], + // 'databasesDelete' => $stats['databases.$all.requests.delete'] ?? [], + // ]); + // } - $response->dynamic($usage, Response::MODEL_USAGE_DATABASES); + // $response->dynamic($usage, Response::MODEL_USAGE_DATABASES); }); App::get('/v1/databases/:databaseId/usage') @@ -2581,97 +2520,97 @@ App::get('/v1/databases/:databaseId/usage') ->inject('dbForProject') ->action(function (string $databaseId, string $range, Response $response, Database $dbForProject) { - $usage = []; - if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { - $periods = [ - '24h' => [ - 'period' => '1h', - 'limit' => 24, - ], - '7d' => [ - 'period' => '1d', - 'limit' => 7, - ], - '30d' => [ - 'period' => '1d', - 'limit' => 30, - ], - '90d' => [ - 'period' => '1d', - 'limit' => 90, - ], - ]; + // $usage = []; + // if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + // $periods = [ + // '24h' => [ + // 'period' => '1h', + // 'limit' => 24, + // ], + // '7d' => [ + // 'period' => '1d', + // 'limit' => 7, + // ], + // '30d' => [ + // 'period' => '1d', + // 'limit' => 30, + // ], + // '90d' => [ + // 'period' => '1d', + // 'limit' => 90, + // ], + // ]; - $metrics = [ - 'collections.' . $databaseId . '.count.total', - 'collections.' . $databaseId . '.requests.create', - 'collections.' . $databaseId . '.requests.read', - 'collections.' . $databaseId . '.requests.update', - 'collections.' . $databaseId . '.requests.delete', - 'documents.' . $databaseId . '.count.total', - 'documents.' . $databaseId . '.requests.create', - 'documents.' . $databaseId . '.requests.read', - 'documents.' . $databaseId . '.requests.update', - 'documents.' . $databaseId . '.requests.delete' - ]; + // $metrics = [ + // 'collections.' . $databaseId . '.count.total', + // 'collections.' . $databaseId . '.requests.create', + // 'collections.' . $databaseId . '.requests.read', + // 'collections.' . $databaseId . '.requests.update', + // 'collections.' . $databaseId . '.requests.delete', + // 'documents.' . $databaseId . '.count.total', + // 'documents.' . $databaseId . '.requests.create', + // 'documents.' . $databaseId . '.requests.read', + // 'documents.' . $databaseId . '.requests.update', + // 'documents.' . $databaseId . '.requests.delete' + // ]; - $stats = []; + // $stats = []; - Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $periods[$range]['limit']; - $period = $periods[$range]['period']; + // Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + // foreach ($metrics as $metric) { + // $limit = $periods[$range]['limit']; + // $period = $periods[$range]['period']; - $requestDocs = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); + // $requestDocs = $dbForProject->find('stats', [ + // Query::equal('period', [$period]), + // Query::equal('metric', [$metric]), + // Query::limit($limit), + // Query::orderDesc('time'), + // ]); - $stats[$metric] = []; - foreach ($requestDocs as $requestDoc) { - $stats[$metric][] = [ - 'value' => $requestDoc->getAttribute('value'), - 'date' => $requestDoc->getAttribute('time'), - ]; - } + // $stats[$metric] = []; + // foreach ($requestDocs as $requestDoc) { + // $stats[$metric][] = [ + // 'value' => $requestDoc->getAttribute('value'), + // 'date' => $requestDoc->getAttribute('time'), + // ]; + // } - // backfill metrics with empty values for graphs - $backfill = $limit - \count($requestDocs); - while ($backfill > 0) { - $last = $limit - $backfill - 1; // array index of last added metric - $diff = match ($period) { // convert period to seconds for unix timestamp math - '1h' => 3600, - '1d' => 86400, - }; - $stats[$metric][] = [ - 'value' => 0, - 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), - ]; - $backfill--; - } - // TODO@kodumbeats explore performance if query is ordered by time ASC - $stats[$metric] = array_reverse($stats[$metric]); - } - }); + // // backfill metrics with empty values for graphs + // $backfill = $limit - \count($requestDocs); + // while ($backfill > 0) { + // $last = $limit - $backfill - 1; // array index of last added metric + // $diff = match ($period) { // convert period to seconds for unix timestamp math + // '1h' => 3600, + // '1d' => 86400, + // }; + // $stats[$metric][] = [ + // 'value' => 0, + // 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + // ]; + // $backfill--; + // } + // // TODO@kodumbeats explore performance if query is ordered by time ASC + // $stats[$metric] = array_reverse($stats[$metric]); + // } + // }); - $usage = new Document([ - 'range' => $range, - 'collectionsCount' => $stats["collections.{$databaseId}.count.total"] ?? [], - 'collectionsCreate' => $stats["collections.{$databaseId}.requests.create"] ?? [], - 'collectionsRead' => $stats["collections.{$databaseId}.requests.read"] ?? [], - 'collectionsUpdate' => $stats["collections.{$databaseId}.requests.update"] ?? [], - 'collectionsDelete' => $stats["collections.{$databaseId}.requests.delete"] ?? [], - 'documentsCount' => $stats["documents.{$databaseId}.count.total"] ?? [], - 'documentsCreate' => $stats["documents.{$databaseId}.requests.create"] ?? [], - 'documentsRead' => $stats["documents.{$databaseId}.requests.read"] ?? [], - 'documentsUpdate' => $stats["documents.{$databaseId}.requests.update"] ?? [], - 'documentsDelete' => $stats["documents.{$databaseId}.requests.delete"] ?? [], - ]); - } + // $usage = new Document([ + // 'range' => $range, + // 'collectionsCount' => $stats["collections.{$databaseId}.count.total"] ?? [], + // 'collectionsCreate' => $stats["collections.{$databaseId}.requests.create"] ?? [], + // 'collectionsRead' => $stats["collections.{$databaseId}.requests.read"] ?? [], + // 'collectionsUpdate' => $stats["collections.{$databaseId}.requests.update"] ?? [], + // 'collectionsDelete' => $stats["collections.{$databaseId}.requests.delete"] ?? [], + // 'documentsCount' => $stats["documents.{$databaseId}.count.total"] ?? [], + // 'documentsCreate' => $stats["documents.{$databaseId}.requests.create"] ?? [], + // 'documentsRead' => $stats["documents.{$databaseId}.requests.read"] ?? [], + // 'documentsUpdate' => $stats["documents.{$databaseId}.requests.update"] ?? [], + // 'documentsDelete' => $stats["documents.{$databaseId}.requests.delete"] ?? [], + // ]); + // } - $response->dynamic($usage, Response::MODEL_USAGE_DATABASE); + // $response->dynamic($usage, Response::MODEL_USAGE_DATABASE); }); App::get('/v1/databases/:databaseId/collections/:collectionId/usage') @@ -2692,93 +2631,93 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage') ->inject('dbForProject') ->action(function (string $databaseId, string $range, string $collectionId, Response $response, Database $dbForProject) { - $database = $dbForProject->getDocument('databases', $databaseId); + // $database = $dbForProject->getDocument('databases', $databaseId); - $collectionDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); - $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collectionDocument->getInternalId()); + // $collectionDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + // $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collectionDocument->getInternalId()); - if ($collection->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } + // if ($collection->isEmpty()) { + // throw new Exception(Exception::COLLECTION_NOT_FOUND); + // } - $usage = []; - if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { - $periods = [ - '24h' => [ - 'period' => '1h', - 'limit' => 24, - ], - '7d' => [ - 'period' => '1d', - 'limit' => 7, - ], - '30d' => [ - 'period' => '1d', - 'limit' => 30, - ], - '90d' => [ - 'period' => '1d', - 'limit' => 90, - ], - ]; + // $usage = []; + // if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + // $periods = [ + // '24h' => [ + // 'period' => '1h', + // 'limit' => 24, + // ], + // '7d' => [ + // 'period' => '1d', + // 'limit' => 7, + // ], + // '30d' => [ + // 'period' => '1d', + // 'limit' => 30, + // ], + // '90d' => [ + // 'period' => '1d', + // 'limit' => 90, + // ], + // ]; - $metrics = [ - "documents.{$databaseId}/{$collectionId}.count.total", - "documents.{$databaseId}/{$collectionId}.requests.create", - "documents.{$databaseId}/{$collectionId}.requests.read", - "documents.{$databaseId}/{$collectionId}.requests.update", - "documents.{$databaseId}/{$collectionId}.requests.delete", - ]; + // $metrics = [ + // "documents.{$databaseId}/{$collectionId}.count.total", + // "documents.{$databaseId}/{$collectionId}.requests.create", + // "documents.{$databaseId}/{$collectionId}.requests.read", + // "documents.{$databaseId}/{$collectionId}.requests.update", + // "documents.{$databaseId}/{$collectionId}.requests.delete", + // ]; - $stats = []; + // $stats = []; - Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $periods[$range]['limit']; - $period = $periods[$range]['period']; + // Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + // foreach ($metrics as $metric) { + // $limit = $periods[$range]['limit']; + // $period = $periods[$range]['period']; - $requestDocs = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); + // $requestDocs = $dbForProject->find('stats', [ + // Query::equal('period', [$period]), + // Query::equal('metric', [$metric]), + // Query::limit($limit), + // Query::orderDesc('time'), + // ]); - $stats[$metric] = []; - foreach ($requestDocs as $requestDoc) { - $stats[$metric][] = [ - 'value' => $requestDoc->getAttribute('value'), - 'date' => $requestDoc->getAttribute('time'), - ]; - } + // $stats[$metric] = []; + // foreach ($requestDocs as $requestDoc) { + // $stats[$metric][] = [ + // 'value' => $requestDoc->getAttribute('value'), + // 'date' => $requestDoc->getAttribute('time'), + // ]; + // } - // backfill metrics with empty values for graphs - $backfill = $limit - \count($requestDocs); - while ($backfill > 0) { - $last = $limit - $backfill - 1; // array index of last added metric - $diff = match ($period) { // convert period to seconds for unix timestamp math - '1h' => 3600, - '1d' => 86400, - }; - $stats[$metric][] = [ - 'value' => 0, - 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), - ]; - $backfill--; - } - $stats[$metric] = array_reverse($stats[$metric]); - } - }); + // // backfill metrics with empty values for graphs + // $backfill = $limit - \count($requestDocs); + // while ($backfill > 0) { + // $last = $limit - $backfill - 1; // array index of last added metric + // $diff = match ($period) { // convert period to seconds for unix timestamp math + // '1h' => 3600, + // '1d' => 86400, + // }; + // $stats[$metric][] = [ + // 'value' => 0, + // 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + // ]; + // $backfill--; + // } + // $stats[$metric] = array_reverse($stats[$metric]); + // } + // }); - $usage = new Document([ - 'range' => $range, - 'documentsCount' => $stats["documents.{$databaseId}/{$collectionId}.count.total"] ?? [], - 'documentsCreate' => $stats["documents.{$databaseId}/{$collectionId}.requests.create"] ?? [], - 'documentsRead' => $stats["documents.{$databaseId}/{$collectionId}.requests.read"] ?? [], - 'documentsUpdate' => $stats["documents.{$databaseId}/{$collectionId}.requests.update"] ?? [], - 'documentsDelete' => $stats["documents.{$databaseId}/{$collectionId}.requests.delete" ?? []] - ]); - } + // $usage = new Document([ + // 'range' => $range, + // 'documentsCount' => $stats["documents.{$databaseId}/{$collectionId}.count.total"] ?? [], + // 'documentsCreate' => $stats["documents.{$databaseId}/{$collectionId}.requests.create"] ?? [], + // 'documentsRead' => $stats["documents.{$databaseId}/{$collectionId}.requests.read"] ?? [], + // 'documentsUpdate' => $stats["documents.{$databaseId}/{$collectionId}.requests.update"] ?? [], + // 'documentsDelete' => $stats["documents.{$databaseId}/{$collectionId}.requests.delete" ?? []] + // ]); + // } - $response->dynamic($usage, Response::MODEL_USAGE_COLLECTION); + // $response->dynamic($usage, Response::MODEL_USAGE_COLLECTION); }); diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 8148303a9..e4191cc04 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -13,7 +13,6 @@ use Utopia\Database\ID; use Utopia\Database\Permission; use Utopia\Database\Role; use Utopia\Database\Validator\UID; -use Appwrite\Usage\Stats; use Utopia\Storage\Device; use Utopia\Storage\Validator\File; use Utopia\Storage\Validator\FileExt; @@ -224,98 +223,98 @@ App::get('/v1/functions/:functionId/usage') ->inject('dbForProject') ->action(function (string $functionId, string $range, Response $response, Database $dbForProject) { - $function = $dbForProject->getDocument('functions', $functionId); + // $function = $dbForProject->getDocument('functions', $functionId); - if ($function->isEmpty()) { - throw new Exception(Exception::FUNCTION_NOT_FOUND); - } + // if ($function->isEmpty()) { + // throw new Exception(Exception::FUNCTION_NOT_FOUND); + // } - $usage = []; - if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { - $periods = [ - '24h' => [ - 'period' => '1h', - 'limit' => 24, - ], - '7d' => [ - 'period' => '1d', - 'limit' => 7, - ], - '30d' => [ - 'period' => '1d', - 'limit' => 30, - ], - '90d' => [ - 'period' => '1d', - 'limit' => 90, - ], - ]; + // $usage = []; + // if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + // $periods = [ + // '24h' => [ + // 'period' => '1h', + // 'limit' => 24, + // ], + // '7d' => [ + // 'period' => '1d', + // 'limit' => 7, + // ], + // '30d' => [ + // 'period' => '1d', + // 'limit' => 30, + // ], + // '90d' => [ + // 'period' => '1d', + // 'limit' => 90, + // ], + // ]; - $metrics = [ - "executions.$functionId.compute.total", - "executions.$functionId.compute.success", - "executions.$functionId.compute.failure", - "executions.$functionId.compute.time", - "builds.$functionId.compute.total", - "builds.$functionId.compute.success", - "builds.$functionId.compute.failure", - "builds.$functionId.compute.time", - ]; + // $metrics = [ + // "executions.$functionId.compute.total", + // "executions.$functionId.compute.success", + // "executions.$functionId.compute.failure", + // "executions.$functionId.compute.time", + // "builds.$functionId.compute.total", + // "builds.$functionId.compute.success", + // "builds.$functionId.compute.failure", + // "builds.$functionId.compute.time", + // ]; - $stats = []; + // $stats = []; - Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $periods[$range]['limit']; - $period = $periods[$range]['period']; + // Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + // foreach ($metrics as $metric) { + // $limit = $periods[$range]['limit']; + // $period = $periods[$range]['period']; - $requestDocs = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); + // $requestDocs = $dbForProject->find('stats', [ + // Query::equal('period', [$period]), + // Query::equal('metric', [$metric]), + // Query::limit($limit), + // Query::orderDesc('time'), + // ]); - $stats[$metric] = []; - foreach ($requestDocs as $requestDoc) { - $stats[$metric][] = [ - 'value' => $requestDoc->getAttribute('value'), - 'date' => $requestDoc->getAttribute('time'), - ]; - } + // $stats[$metric] = []; + // foreach ($requestDocs as $requestDoc) { + // $stats[$metric][] = [ + // 'value' => $requestDoc->getAttribute('value'), + // 'date' => $requestDoc->getAttribute('time'), + // ]; + // } - // backfill metrics with empty values for graphs - $backfill = $limit - \count($requestDocs); - while ($backfill > 0) { - $last = $limit - $backfill - 1; // array index of last added metric - $diff = match ($period) { // convert period to seconds for unix timestamp math - '1h' => 3600, - '1d' => 86400, - }; - $stats[$metric][] = [ - 'value' => 0, - 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), - ]; - $backfill--; - } - $stats[$metric] = array_reverse($stats[$metric]); - } - }); + // // backfill metrics with empty values for graphs + // $backfill = $limit - \count($requestDocs); + // while ($backfill > 0) { + // $last = $limit - $backfill - 1; // array index of last added metric + // $diff = match ($period) { // convert period to seconds for unix timestamp math + // '1h' => 3600, + // '1d' => 86400, + // }; + // $stats[$metric][] = [ + // 'value' => 0, + // 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + // ]; + // $backfill--; + // } + // $stats[$metric] = array_reverse($stats[$metric]); + // } + // }); - $usage = new Document([ - 'range' => $range, - 'executionsTotal' => $stats["executions.$functionId.compute.total"] ?? [], - 'executionsFailure' => $stats["executions.$functionId.compute.failure"] ?? [], - 'executionsSuccesse' => $stats["executions.$functionId.compute.success"] ?? [], - 'executionsTime' => $stats["executions.$functionId.compute.time"] ?? [], - 'buildsTotal' => $stats["builds.$functionId.compute.total"] ?? [], - 'buildsFailure' => $stats["builds.$functionId.compute.failure"] ?? [], - 'buildsSuccess' => $stats["builds.$functionId.compute.success"] ?? [], - 'buildsTime' => $stats["builds.$functionId.compute.time" ?? []] - ]); - } + // $usage = new Document([ + // 'range' => $range, + // 'executionsTotal' => $stats["executions.$functionId.compute.total"] ?? [], + // 'executionsFailure' => $stats["executions.$functionId.compute.failure"] ?? [], + // 'executionsSuccesse' => $stats["executions.$functionId.compute.success"] ?? [], + // 'executionsTime' => $stats["executions.$functionId.compute.time"] ?? [], + // 'buildsTotal' => $stats["builds.$functionId.compute.total"] ?? [], + // 'buildsFailure' => $stats["builds.$functionId.compute.failure"] ?? [], + // 'buildsSuccess' => $stats["builds.$functionId.compute.success"] ?? [], + // 'buildsTime' => $stats["builds.$functionId.compute.time" ?? []] + // ]); + // } - $response->dynamic($usage, Response::MODEL_USAGE_FUNCTION); + // $response->dynamic($usage, Response::MODEL_USAGE_FUNCTION); }); App::get('/v1/functions/usage') @@ -333,92 +332,92 @@ App::get('/v1/functions/usage') ->inject('dbForProject') ->action(function (string $range, Response $response, Database $dbForProject) { - $usage = []; - if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { - $periods = [ - '24h' => [ - 'period' => '1h', - 'limit' => 24, - ], - '7d' => [ - 'period' => '1d', - 'limit' => 7, - ], - '30d' => [ - 'period' => '1d', - 'limit' => 30, - ], - '90d' => [ - 'period' => '1d', - 'limit' => 90, - ], - ]; + // $usage = []; + // if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + // $periods = [ + // '24h' => [ + // 'period' => '1h', + // 'limit' => 24, + // ], + // '7d' => [ + // 'period' => '1d', + // 'limit' => 7, + // ], + // '30d' => [ + // 'period' => '1d', + // 'limit' => 30, + // ], + // '90d' => [ + // 'period' => '1d', + // 'limit' => 90, + // ], + // ]; - $metrics = [ - 'executions.$all.compute.total', - 'executions.$all.compute.failure', - 'executions.$all.compute.success', - 'executions.$all.compute.time', - 'builds.$all.compute.total', - 'builds.$all.compute.failure', - 'builds.$all.compute.success', - 'builds.$all.compute.time', - ]; + // $metrics = [ + // 'executions.$all.compute.total', + // 'executions.$all.compute.failure', + // 'executions.$all.compute.success', + // 'executions.$all.compute.time', + // 'builds.$all.compute.total', + // 'builds.$all.compute.failure', + // 'builds.$all.compute.success', + // 'builds.$all.compute.time', + // ]; - $stats = []; + // $stats = []; - Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $periods[$range]['limit']; - $period = $periods[$range]['period']; + // Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + // foreach ($metrics as $metric) { + // $limit = $periods[$range]['limit']; + // $period = $periods[$range]['period']; - $requestDocs = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); + // $requestDocs = $dbForProject->find('stats', [ + // Query::equal('period', [$period]), + // Query::equal('metric', [$metric]), + // Query::limit($limit), + // Query::orderDesc('time'), + // ]); - $stats[$metric] = []; - foreach ($requestDocs as $requestDoc) { - $stats[$metric][] = [ - 'value' => $requestDoc->getAttribute('value'), - 'date' => $requestDoc->getAttribute('time'), - ]; - } + // $stats[$metric] = []; + // foreach ($requestDocs as $requestDoc) { + // $stats[$metric][] = [ + // 'value' => $requestDoc->getAttribute('value'), + // 'date' => $requestDoc->getAttribute('time'), + // ]; + // } - // backfill metrics with empty values for graphs - $backfill = $limit - \count($requestDocs); - while ($backfill > 0) { - $last = $limit - $backfill - 1; // array index of last added metric - $diff = match ($period) { // convert period to seconds for unix timestamp math - '1h' => 3600, - '1d' => 86400, - }; - $stats[$metric][] = [ - 'value' => 0, - 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), - ]; - $backfill--; - } - $stats[$metric] = array_reverse($stats[$metric]); - } - }); + // // backfill metrics with empty values for graphs + // $backfill = $limit - \count($requestDocs); + // while ($backfill > 0) { + // $last = $limit - $backfill - 1; // array index of last added metric + // $diff = match ($period) { // convert period to seconds for unix timestamp math + // '1h' => 3600, + // '1d' => 86400, + // }; + // $stats[$metric][] = [ + // 'value' => 0, + // 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + // ]; + // $backfill--; + // } + // $stats[$metric] = array_reverse($stats[$metric]); + // } + // }); - $usage = new Document([ - 'range' => $range, - 'executionsTotal' => $stats[$metrics[0]] ?? [], - 'executionsFailure' => $stats[$metrics[1]] ?? [], - 'executionsSuccess' => $stats[$metrics[2]] ?? [], - 'executionsTime' => $stats[$metrics[3]] ?? [], - 'buildsTotal' => $stats[$metrics[4]] ?? [], - 'buildsFailure' => $stats[$metrics[5]] ?? [], - 'buildsSuccess' => $stats[$metrics[6]] ?? [], - 'buildsTime' => $stats[$metrics[7]] ?? [], - ]); - } + // $usage = new Document([ + // 'range' => $range, + // 'executionsTotal' => $stats[$metrics[0]] ?? [], + // 'executionsFailure' => $stats[$metrics[1]] ?? [], + // 'executionsSuccess' => $stats[$metrics[2]] ?? [], + // 'executionsTime' => $stats[$metrics[3]] ?? [], + // 'buildsTotal' => $stats[$metrics[4]] ?? [], + // 'buildsFailure' => $stats[$metrics[5]] ?? [], + // 'buildsSuccess' => $stats[$metrics[6]] ?? [], + // 'buildsTime' => $stats[$metrics[7]] ?? [], + // ]); + // } - $response->dynamic($usage, Response::MODEL_USAGE_FUNCTIONS); + // $response->dynamic($usage, Response::MODEL_USAGE_FUNCTIONS); }); App::put('/v1/functions/:functionId') @@ -1063,10 +1062,9 @@ App::post('/v1/functions/:functionId/executions') ->inject('dbForProject') ->inject('user') ->inject('events') - ->inject('usage') ->inject('mode') ->inject('queueForFunctions') - ->action(function (string $functionId, string $data, bool $async, Response $response, Document $project, Database $dbForProject, Document $user, Event $events, Stats $usage, string $mode, Func $queueForFunctions) { + ->action(function (string $functionId, string $data, bool $async, Response $response, Document $project, Database $dbForProject, Document $user, Event $events, string $mode, Func $queueForFunctions) { $function = Authorization::skip(fn () => $dbForProject->getDocument('functions', $functionId)); @@ -1220,13 +1218,6 @@ App::post('/v1/functions/:functionId/executions') Authorization::skip(fn () => $dbForProject->updateDocument('executions', $executionId, $execution)); - // TODO revise this later using route label - $usage - ->setParam('functionId', $function->getId()) - ->setParam('executions.{scope}.compute', 1) - ->setParam('executionStatus', $execution->getAttribute('status', '')) - ->setParam('executionTime', $execution->getAttribute('duration')); // ms - $roles = Authorization::getRoles(); $isPrivilegedUser = Auth::isPrivilegedUser($roles); $isAppUser = Auth::isAppUser($roles); diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index 58867bb49..6e5b07c64 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -23,90 +23,90 @@ App::get('/v1/project/usage') ->inject('response') ->inject('dbForProject') ->action(function (string $range, Response $response, Database $dbForProject) { - $usage = []; - if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { - $periods = [ - '24h' => [ - 'period' => '1h', - 'limit' => 24, - ], - '7d' => [ - 'period' => '1d', - 'limit' => 7, - ], - '30d' => [ - 'period' => '1d', - 'limit' => 30, - ], - '90d' => [ - 'period' => '1d', - 'limit' => 90, - ], - ]; + // $usage = []; + // if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + // $periods = [ + // '24h' => [ + // 'period' => '1h', + // 'limit' => 24, + // ], + // '7d' => [ + // 'period' => '1d', + // 'limit' => 7, + // ], + // '30d' => [ + // 'period' => '1d', + // 'limit' => 30, + // ], + // '90d' => [ + // 'period' => '1d', + // 'limit' => 90, + // ], + // ]; - $metrics = [ - 'project.$all.network.requests', - 'project.$all.network.bandwidth', - 'project.$all.storage.size', - 'users.$all.count.total', - 'databases.$all.count.total', - 'documents.$all.count.total', - 'executions.$all.compute.total', - 'buckets.$all.count.total' - ]; + // $metrics = [ + // 'project.$all.network.requests', + // 'project.$all.network.bandwidth', + // 'project.$all.storage.size', + // 'users.$all.count.total', + // 'databases.$all.count.total', + // 'documents.$all.count.total', + // 'executions.$all.compute.total', + // 'buckets.$all.count.total' + // ]; - $stats = []; + // $stats = []; - Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $periods[$range]['limit']; - $period = $periods[$range]['period']; + // Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + // foreach ($metrics as $metric) { + // $limit = $periods[$range]['limit']; + // $period = $periods[$range]['period']; - $requestDocs = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); + // $requestDocs = $dbForProject->find('stats', [ + // Query::equal('period', [$period]), + // Query::equal('metric', [$metric]), + // Query::limit($limit), + // Query::orderDesc('time'), + // ]); - $stats[$metric] = []; - foreach ($requestDocs as $requestDoc) { - $stats[$metric][] = [ - 'value' => $requestDoc->getAttribute('value'), - 'date' => $requestDoc->getAttribute('time'), - ]; - } + // $stats[$metric] = []; + // foreach ($requestDocs as $requestDoc) { + // $stats[$metric][] = [ + // 'value' => $requestDoc->getAttribute('value'), + // 'date' => $requestDoc->getAttribute('time'), + // ]; + // } - // backfill metrics with empty values for graphs - $backfill = $limit - \count($requestDocs); - while ($backfill > 0) { - $last = $limit - $backfill - 1; // array index of last added metric - $diff = match ($period) { // convert period to seconds for unix timestamp math - '1h' => 3600, - '1d' => 86400, - }; - $stats[$metric][] = [ - 'value' => 0, - 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), - ]; - $backfill--; - } - $stats[$metric] = array_reverse($stats[$metric]); - } - }); + // // backfill metrics with empty values for graphs + // $backfill = $limit - \count($requestDocs); + // while ($backfill > 0) { + // $last = $limit - $backfill - 1; // array index of last added metric + // $diff = match ($period) { // convert period to seconds for unix timestamp math + // '1h' => 3600, + // '1d' => 86400, + // }; + // $stats[$metric][] = [ + // 'value' => 0, + // 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + // ]; + // $backfill--; + // } + // $stats[$metric] = array_reverse($stats[$metric]); + // } + // }); - $usage = new Document([ - 'range' => $range, - 'requests' => $stats[$metrics[0]] ?? [], - 'network' => $stats[$metrics[1]] ?? [], - 'storage' => $stats[$metrics[2]] ?? [], - 'users' => $stats[$metrics[3]] ?? [], - 'databases' => $stats[$metrics[4]] ?? [], - 'documents' => $stats[$metrics[5]] ?? [], - 'executions' => $stats[$metrics[6]] ?? [], - 'buckets' => $stats[$metrics[7]] ?? [], - ]); - } + // $usage = new Document([ + // 'range' => $range, + // 'requests' => $stats[$metrics[0]] ?? [], + // 'network' => $stats[$metrics[1]] ?? [], + // 'storage' => $stats[$metrics[2]] ?? [], + // 'users' => $stats[$metrics[3]] ?? [], + // 'databases' => $stats[$metrics[4]] ?? [], + // 'documents' => $stats[$metrics[5]] ?? [], + // 'executions' => $stats[$metrics[6]] ?? [], + // 'buckets' => $stats[$metrics[7]] ?? [], + // ]); + // } - $response->dynamic($usage, Response::MODEL_USAGE_PROJECT); + // $response->dynamic($usage, Response::MODEL_USAGE_PROJECT); }); diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 71979cca5..45bb8148a 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -51,7 +51,6 @@ App::post('/v1/storage/buckets') ->label('event', 'buckets.[bucketId].create') ->label('audits.event', 'bucket.create') ->label('audits.resource', 'bucket/{response.$id}') - ->label('usage.metric', 'buckets.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'createBucket') @@ -147,7 +146,6 @@ App::get('/v1/storage/buckets') ->desc('List buckets') ->groups(['api', 'storage']) ->label('scope', 'buckets.read') - ->label('usage.metric', 'buckets.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'listBuckets') @@ -194,7 +192,6 @@ App::get('/v1/storage/buckets/:bucketId') ->desc('Get Bucket') ->groups(['api', 'storage']) ->label('scope', 'buckets.read') - ->label('usage.metric', 'buckets.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'getBucket') @@ -223,7 +220,6 @@ App::put('/v1/storage/buckets/:bucketId') ->label('event', 'buckets.[bucketId].update') ->label('audits.event', 'bucket.update') ->label('audits.resource', 'bucket/{response.$id}') - ->label('usage.metric', 'buckets.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'updateBucket') @@ -290,7 +286,6 @@ App::delete('/v1/storage/buckets/:bucketId') ->label('audits.event', 'bucket.delete') ->label('event', 'buckets.[bucketId].delete') ->label('audits.resource', 'bucket/{request.bucketId}') - ->label('usage.metric', 'buckets.{scope}.requests.delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'deleteBucket') @@ -333,8 +328,6 @@ App::post('/v1/storage/buckets/:bucketId/files') ->label('audits.event', 'file.create') ->label('event', 'buckets.[bucketId].files.[fileId].create') ->label('audits.resource', 'file/{response.$id}') - ->label('usage.metric', 'files.{scope}.requests.create') - ->label('usage.params', ['bucketId:{request.bucketId}']) ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) @@ -660,8 +653,6 @@ App::get('/v1/storage/buckets/:bucketId/files') ->groups(['api', 'storage']) ->label('scope', 'files.read') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('usage.metric', 'files.{scope}.requests.read') - ->label('usage.params', ['bucketId:{request.bucketId}']) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'listFiles') ->label('sdk.description', '/docs/references/storage/list-files.md') @@ -737,8 +728,6 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId') ->groups(['api', 'storage']) ->label('scope', 'files.read') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('usage.metric', 'files.{scope}.requests.read') - ->label('usage.params', ['bucketId:{request.bucketId}']) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'getFile') ->label('sdk.description', '/docs/references/storage/get-file.md') @@ -786,8 +775,6 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') ->label('cache', true) ->label('cache.resourceType', 'bucket/{request.bucketId}') ->label('cache.resource', 'file/{request.fileId}') - ->label('usage.metric', 'files.{scope}.requests.read') - ->label('usage.params', ['bucketId:{request.bucketId}']) ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'getFilePreview') @@ -949,8 +936,6 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/download') ->desc('Get File for Download') ->groups(['api', 'storage']) ->label('scope', 'files.read') - ->label('usage.metric', 'files.{scope}.requests.read') - ->label('usage.params', ['bucketId:{request.bucketId}']) ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'getFileDownload') @@ -1089,8 +1074,6 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/view') ->desc('Get File for View') ->groups(['api', 'storage']) ->label('scope', 'files.read') - ->label('usage.metric', 'files.{scope}.requests.read') - ->label('usage.params', ['bucketId:{request.bucketId}']) ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'getFileView') @@ -1243,8 +1226,6 @@ App::put('/v1/storage/buckets/:bucketId/files/:fileId') ->label('event', 'buckets.[bucketId].files.[fileId].update') ->label('audits.event', 'file.update') ->label('audits.resource', 'file/{response.$id}') - ->label('usage.metric', 'files.{scope}.requests.update') - ->label('usage.params', ['bucketId:{request.bucketId}']) ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) @@ -1346,8 +1327,6 @@ App::delete('/v1/storage/buckets/:bucketId/files/:fileId') ->label('event', 'buckets.[bucketId].files.[fileId].delete') ->label('audits.event', 'file.delete') ->label('audits.resource', 'file/{request.fileId}') - ->label('usage.metric', 'files.{scope}.requests.delete') - ->label('usage.params', ['bucketId:{request.bucketId}']) ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) @@ -1449,99 +1428,99 @@ App::get('/v1/storage/usage') ->inject('dbForProject') ->action(function (string $range, Response $response, Database $dbForProject) { - $usage = []; - if (App::getEnv('_APP_USAGE_STATS', 'enabled') === 'enabled') { - $periods = [ - '24h' => [ - 'period' => '1h', - 'limit' => 24, - ], - '7d' => [ - 'period' => '1d', - 'limit' => 7, - ], - '30d' => [ - 'period' => '1d', - 'limit' => 30, - ], - '90d' => [ - 'period' => '1d', - 'limit' => 90, - ], - ]; + // $usage = []; + // if (App::getEnv('_APP_USAGE_STATS', 'enabled') === 'enabled') { + // $periods = [ + // '24h' => [ + // 'period' => '1h', + // 'limit' => 24, + // ], + // '7d' => [ + // 'period' => '1d', + // 'limit' => 7, + // ], + // '30d' => [ + // 'period' => '1d', + // 'limit' => 30, + // ], + // '90d' => [ + // 'period' => '1d', + // 'limit' => 90, + // ], + // ]; - $metrics = [ - 'project.$all.storage.size', - 'buckets.$all.count.total', - 'buckets.$all.requests.create', - 'buckets.$all.requests.read', - 'buckets.$all.requests.update', - 'buckets.$all.requests.delete', - 'files.$all.storage.size', - 'files.$all.count.total', - 'files.$all.requests.create', - 'files.$all.requests.read', - 'files.$all.requests.update', - 'files.$all.requests.delete', - ]; + // $metrics = [ + // 'project.$all.storage.size', + // 'buckets.$all.count.total', + // 'buckets.$all.requests.create', + // 'buckets.$all.requests.read', + // 'buckets.$all.requests.update', + // 'buckets.$all.requests.delete', + // 'files.$all.storage.size', + // 'files.$all.count.total', + // 'files.$all.requests.create', + // 'files.$all.requests.read', + // 'files.$all.requests.update', + // 'files.$all.requests.delete', + // ]; - $stats = []; + // $stats = []; - Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $periods[$range]['limit']; - $period = $periods[$range]['period']; + // Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + // foreach ($metrics as $metric) { + // $limit = $periods[$range]['limit']; + // $period = $periods[$range]['period']; - $requestDocs = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); + // $requestDocs = $dbForProject->find('stats', [ + // Query::equal('period', [$period]), + // Query::equal('metric', [$metric]), + // Query::limit($limit), + // Query::orderDesc('time'), + // ]); - $stats[$metric] = []; - foreach ($requestDocs as $requestDoc) { - $stats[$metric][] = [ - 'value' => $requestDoc->getAttribute('value'), - 'date' => $requestDoc->getAttribute('time'), - ]; - } + // $stats[$metric] = []; + // foreach ($requestDocs as $requestDoc) { + // $stats[$metric][] = [ + // 'value' => $requestDoc->getAttribute('value'), + // 'date' => $requestDoc->getAttribute('time'), + // ]; + // } - // backfill metrics with empty values for graphs - $backfill = $limit - \count($requestDocs); - while ($backfill > 0) { - $last = $limit - $backfill - 1; // array index of last added metric - $diff = match ($period) { // convert period to seconds for unix timestamp math - '1h' => 3600, - '1d' => 86400, - }; - $stats[$metric][] = [ - 'value' => 0, - 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), - ]; - $backfill--; - } - $stats[$metric] = array_reverse($stats[$metric]); - } - }); + // // backfill metrics with empty values for graphs + // $backfill = $limit - \count($requestDocs); + // while ($backfill > 0) { + // $last = $limit - $backfill - 1; // array index of last added metric + // $diff = match ($period) { // convert period to seconds for unix timestamp math + // '1h' => 3600, + // '1d' => 86400, + // }; + // $stats[$metric][] = [ + // 'value' => 0, + // 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + // ]; + // $backfill--; + // } + // $stats[$metric] = array_reverse($stats[$metric]); + // } + // }); - $usage = new Document([ - 'range' => $range, - 'bucketsCount' => $stats['buckets.$all.count.total'], - 'bucketsCreate' => $stats['buckets.$all.requests.create'], - 'bucketsRead' => $stats['buckets.$all.requests.read'], - 'bucketsUpdate' => $stats['buckets.$all.requests.update'], - 'bucketsDelete' => $stats['buckets.$all.requests.delete'], - 'storage' => $stats['project.$all.storage.size'], - 'filesCount' => $stats['files.$all.count.total'], - 'filesCreate' => $stats['files.$all.requests.create'], - 'filesRead' => $stats['files.$all.requests.read'], - 'filesUpdate' => $stats['files.$all.requests.update'], - 'filesDelete' => $stats['files.$all.requests.delete'], - ]); - } + // $usage = new Document([ + // 'range' => $range, + // 'bucketsCount' => $stats['buckets.$all.count.total'], + // 'bucketsCreate' => $stats['buckets.$all.requests.create'], + // 'bucketsRead' => $stats['buckets.$all.requests.read'], + // 'bucketsUpdate' => $stats['buckets.$all.requests.update'], + // 'bucketsDelete' => $stats['buckets.$all.requests.delete'], + // 'storage' => $stats['project.$all.storage.size'], + // 'filesCount' => $stats['files.$all.count.total'], + // 'filesCreate' => $stats['files.$all.requests.create'], + // 'filesRead' => $stats['files.$all.requests.read'], + // 'filesUpdate' => $stats['files.$all.requests.update'], + // 'filesDelete' => $stats['files.$all.requests.delete'], + // ]); + // } - $response->dynamic($usage, Response::MODEL_USAGE_STORAGE); + // $response->dynamic($usage, Response::MODEL_USAGE_STORAGE); }); App::get('/v1/storage/:bucketId/usage') @@ -1560,92 +1539,92 @@ App::get('/v1/storage/:bucketId/usage') ->inject('dbForProject') ->action(function (string $bucketId, string $range, Response $response, Database $dbForProject) { - $bucket = $dbForProject->getDocument('buckets', $bucketId); + // $bucket = $dbForProject->getDocument('buckets', $bucketId); - if ($bucket->isEmpty()) { - throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); - } + // if ($bucket->isEmpty()) { + // throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); + // } - $usage = []; - if (App::getEnv('_APP_USAGE_STATS', 'enabled') === 'enabled') { - $periods = [ - '24h' => [ - 'period' => '1h', - 'limit' => 24, - ], - '7d' => [ - 'period' => '1d', - 'limit' => 7, - ], - '30d' => [ - 'period' => '1d', - 'limit' => 30, - ], - '90d' => [ - 'period' => '1d', - 'limit' => 90, - ], - ]; + // $usage = []; + // if (App::getEnv('_APP_USAGE_STATS', 'enabled') === 'enabled') { + // $periods = [ + // '24h' => [ + // 'period' => '1h', + // 'limit' => 24, + // ], + // '7d' => [ + // 'period' => '1d', + // 'limit' => 7, + // ], + // '30d' => [ + // 'period' => '1d', + // 'limit' => 30, + // ], + // '90d' => [ + // 'period' => '1d', + // 'limit' => 90, + // ], + // ]; - $metrics = [ - "files.{$bucketId}.count.total", - "files.{$bucketId}.storage.size", - "files.{$bucketId}.requests.create", - "files.{$bucketId}.requests.read", - "files.{$bucketId}.requests.update", - "files.{$bucketId}.requests.delete", - ]; + // $metrics = [ + // "files.{$bucketId}.count.total", + // "files.{$bucketId}.storage.size", + // "files.{$bucketId}.requests.create", + // "files.{$bucketId}.requests.read", + // "files.{$bucketId}.requests.update", + // "files.{$bucketId}.requests.delete", + // ]; - $stats = []; + // $stats = []; - Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $periods[$range]['limit']; - $period = $periods[$range]['period']; + // Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + // foreach ($metrics as $metric) { + // $limit = $periods[$range]['limit']; + // $period = $periods[$range]['period']; - $requestDocs = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); + // $requestDocs = $dbForProject->find('stats', [ + // Query::equal('period', [$period]), + // Query::equal('metric', [$metric]), + // Query::limit($limit), + // Query::orderDesc('time'), + // ]); - $stats[$metric] = []; - foreach ($requestDocs as $requestDoc) { - $stats[$metric][] = [ - 'value' => $requestDoc->getAttribute('value'), - 'date' => $requestDoc->getAttribute('time'), - ]; - } + // $stats[$metric] = []; + // foreach ($requestDocs as $requestDoc) { + // $stats[$metric][] = [ + // 'value' => $requestDoc->getAttribute('value'), + // 'date' => $requestDoc->getAttribute('time'), + // ]; + // } - // backfill metrics with empty values for graphs - $backfill = $limit - \count($requestDocs); - while ($backfill > 0) { - $last = $limit - $backfill - 1; // array index of last added metric - $diff = match ($period) { // convert period to seconds for unix timestamp math - '1h' => 3600, - '1d' => 86400, - }; - $stats[$metric][] = [ - 'value' => 0, - 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), - ]; - $backfill--; - } - $stats[$metric] = array_reverse($stats[$metric]); - } - }); + // // backfill metrics with empty values for graphs + // $backfill = $limit - \count($requestDocs); + // while ($backfill > 0) { + // $last = $limit - $backfill - 1; // array index of last added metric + // $diff = match ($period) { // convert period to seconds for unix timestamp math + // '1h' => 3600, + // '1d' => 86400, + // }; + // $stats[$metric][] = [ + // 'value' => 0, + // 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + // ]; + // $backfill--; + // } + // $stats[$metric] = array_reverse($stats[$metric]); + // } + // }); - $usage = new Document([ - 'range' => $range, - 'filesCount' => $stats[$metrics[0]], - 'filesStorage' => $stats[$metrics[1]], - 'filesCreate' => $stats[$metrics[2]], - 'filesRead' => $stats[$metrics[3]], - 'filesUpdate' => $stats[$metrics[4]], - 'filesDelete' => $stats[$metrics[5]], - ]); - } + // $usage = new Document([ + // 'range' => $range, + // 'filesCount' => $stats[$metrics[0]], + // 'filesStorage' => $stats[$metrics[1]], + // 'filesCreate' => $stats[$metrics[2]], + // 'filesRead' => $stats[$metrics[3]], + // 'filesUpdate' => $stats[$metrics[4]], + // 'filesDelete' => $stats[$metrics[5]], + // ]); + // } - $response->dynamic($usage, Response::MODEL_USAGE_BUCKETS); + // $response->dynamic($usage, Response::MODEL_USAGE_BUCKETS); }); diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index dce493b02..89ea0be70 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -90,7 +90,6 @@ App::post('/v1/users') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'create') @@ -121,7 +120,6 @@ App::post('/v1/users/bcrypt') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'createBcryptUser') @@ -151,7 +149,6 @@ App::post('/v1/users/md5') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'createMD5User') @@ -181,7 +178,6 @@ App::post('/v1/users/argon2') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'createArgon2User') @@ -211,7 +207,6 @@ App::post('/v1/users/sha') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'createSHAUser') @@ -248,7 +243,6 @@ App::post('/v1/users/phpass') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'createPHPassUser') @@ -278,7 +272,6 @@ App::post('/v1/users/scrypt') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'createScryptUser') @@ -321,7 +314,6 @@ App::post('/v1/users/scrypt-modified') ->label('scope', 'users.write') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'createScryptModifiedUser') @@ -351,7 +343,6 @@ App::get('/v1/users') ->desc('List Users') ->groups(['api', 'users']) ->label('scope', 'users.read') - ->label('usage.metric', 'users.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'list') @@ -398,7 +389,6 @@ App::get('/v1/users/:userId') ->desc('Get User') ->groups(['api', 'users']) ->label('scope', 'users.read') - ->label('usage.metric', 'users.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'get') @@ -424,7 +414,6 @@ App::get('/v1/users/:userId/prefs') ->desc('Get User Preferences') ->groups(['api', 'users']) ->label('scope', 'users.read') - ->label('usage.metric', 'users.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'getPrefs') @@ -452,7 +441,6 @@ App::get('/v1/users/:userId/sessions') ->desc('List User Sessions') ->groups(['api', 'users']) ->label('scope', 'users.read') - ->label('usage.metric', 'users.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'listSessions') @@ -494,7 +482,6 @@ App::get('/v1/users/:userId/memberships') ->desc('List User Memberships') ->groups(['api', 'users']) ->label('scope', 'users.read') - ->label('usage.metric', 'users.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'listMemberships') @@ -534,7 +521,6 @@ App::get('/v1/users/:userId/logs') ->desc('List User Logs') ->groups(['api', 'users']) ->label('scope', 'users.read') - ->label('usage.metric', 'users.{scope}.requests.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'listLogs') @@ -620,7 +606,6 @@ App::patch('/v1/users/:userId/status') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'updateStatus') @@ -656,7 +641,6 @@ App::patch('/v1/users/:userId/verification') ->label('scope', 'users.write') ->label('audits.event', 'verification.update') ->label('audits.resource', 'user/{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'updateEmailVerification') @@ -692,7 +676,6 @@ App::patch('/v1/users/:userId/verification/phone') ->label('scope', 'users.write') ->label('audits.event', 'verification.update') ->label('audits.resource', 'user/{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'updatePhoneVerification') @@ -729,7 +712,6 @@ App::patch('/v1/users/:userId/name') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'updateName') @@ -770,7 +752,6 @@ App::patch('/v1/users/:userId/password') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'updatePassword') @@ -812,7 +793,6 @@ App::patch('/v1/users/:userId/email') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'updateEmail') @@ -858,7 +838,6 @@ App::patch('/v1/users/:userId/phone') ->label('scope', 'users.write') ->label('audits.event', 'user.update') ->label('audits.resource', 'user/{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'updatePhone') @@ -904,7 +883,6 @@ App::patch('/v1/users/:userId/verification') ->label('audits.event', 'verification.update') ->label('audits.resource', 'user/{request.userId}') ->label('audits.userId', '{request.userId}') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'updateEmailVerification') @@ -937,7 +915,6 @@ App::patch('/v1/users/:userId/prefs') ->groups(['api', 'users']) ->label('event', 'users.[userId].update.prefs') ->label('scope', 'users.write') - ->label('usage.metric', 'users.{scope}.requests.update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'updatePrefs') @@ -973,7 +950,6 @@ App::delete('/v1/users/:userId/sessions/:sessionId') ->label('scope', 'users.write') ->label('audits.event', 'session.delete') ->label('audits.resource', 'user/{request.userId}') - ->label('usage.metric', 'sessions.{scope}.requests.delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'deleteSession') @@ -1016,7 +992,6 @@ App::delete('/v1/users/:userId/sessions') ->label('scope', 'users.write') ->label('audits.event', 'session.delete') ->label('audits.resource', 'user/{user.$id}') - ->label('usage.metric', 'sessions.{scope}.requests.delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'deleteSessions') @@ -1059,7 +1034,6 @@ App::delete('/v1/users/:userId') ->label('scope', 'users.write') ->label('audits.event', 'user.delete') ->label('audits.resource', 'user/{request.userId}') - ->label('usage.metric', 'users.{scope}.requests.delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'users') ->label('sdk.method', 'delete') @@ -1112,90 +1086,90 @@ App::get('/v1/users/usage') ->inject('register') ->action(function (string $range, string $provider, Response $response, Database $dbForProject) { - $usage = []; - if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { - $periods = [ - '24h' => [ - 'period' => '1h', - 'limit' => 24, - ], - '7d' => [ - 'period' => '1d', - 'limit' => 7, - ], - '30d' => [ - 'period' => '1d', - 'limit' => 30, - ], - '90d' => [ - 'period' => '1d', - 'limit' => 90, - ], - ]; + // $usage = []; + // if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + // $periods = [ + // '24h' => [ + // 'period' => '1h', + // 'limit' => 24, + // ], + // '7d' => [ + // 'period' => '1d', + // 'limit' => 7, + // ], + // '30d' => [ + // 'period' => '1d', + // 'limit' => 30, + // ], + // '90d' => [ + // 'period' => '1d', + // 'limit' => 90, + // ], + // ]; - $metrics = [ - 'users.$all.count.total', - 'users.$all.requests.create', - 'users.$all.requests.read', - 'users.$all.requests.update', - 'users.$all.requests.delete', - 'sessions.$all.requests.create', - 'sessions.$all.requests.delete', - "sessions.$provider.requests.create", - ]; + // $metrics = [ + // 'users.$all.count.total', + // 'users.$all.requests.create', + // 'users.$all.requests.read', + // 'users.$all.requests.update', + // 'users.$all.requests.delete', + // 'sessions.$all.requests.create', + // 'sessions.$all.requests.delete', + // "sessions.$provider.requests.create", + // ]; - $stats = []; + // $stats = []; - Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $periods[$range]['limit']; - $period = $periods[$range]['period']; + // Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + // foreach ($metrics as $metric) { + // $limit = $periods[$range]['limit']; + // $period = $periods[$range]['period']; - $requestDocs = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); + // $requestDocs = $dbForProject->find('stats', [ + // Query::equal('period', [$period]), + // Query::equal('metric', [$metric]), + // Query::limit($limit), + // Query::orderDesc('time'), + // ]); - $stats[$metric] = []; - foreach ($requestDocs as $requestDoc) { - $stats[$metric][] = [ - 'value' => $requestDoc->getAttribute('value'), - 'date' => $requestDoc->getAttribute('time'), - ]; - } + // $stats[$metric] = []; + // foreach ($requestDocs as $requestDoc) { + // $stats[$metric][] = [ + // 'value' => $requestDoc->getAttribute('value'), + // 'date' => $requestDoc->getAttribute('time'), + // ]; + // } - // backfill metrics with empty values for graphs - $backfill = $limit - \count($requestDocs); - while ($backfill > 0) { - $last = $limit - $backfill - 1; // array index of last added metric - $diff = match ($period) { // convert period to seconds for unix timestamp math - '1h' => 3600, - '1d' => 86400, - }; - $stats[$metric][] = [ - 'value' => 0, - 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), - ]; - $backfill--; - } - $stats[$metric] = array_reverse($stats[$metric]); - } - }); + // // backfill metrics with empty values for graphs + // $backfill = $limit - \count($requestDocs); + // while ($backfill > 0) { + // $last = $limit - $backfill - 1; // array index of last added metric + // $diff = match ($period) { // convert period to seconds for unix timestamp math + // '1h' => 3600, + // '1d' => 86400, + // }; + // $stats[$metric][] = [ + // 'value' => 0, + // 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), + // ]; + // $backfill--; + // } + // $stats[$metric] = array_reverse($stats[$metric]); + // } + // }); - $usage = new Document([ - 'range' => $range, - 'usersCount' => $stats['users.$all.count.total'] ?? [], - 'usersCreate' => $stats['users.$all.requests.create'] ?? [], - 'usersRead' => $stats['users.$all.requests.read'] ?? [], - 'usersUpdate' => $stats['users.$all.requests.update'] ?? [], - 'usersDelete' => $stats['users.$all.requests.delete'] ?? [], - 'sessionsCreate' => $stats['sessions.$all.requests.create'] ?? [], - 'sessionsProviderCreate' => $stats["sessions.$provider.requests.create"] ?? [], - 'sessionsDelete' => $stats['sessions.$all.requests.delete' ?? []] - ]); - } + // $usage = new Document([ + // 'range' => $range, + // 'usersCount' => $stats['users.$all.count.total'] ?? [], + // 'usersCreate' => $stats['users.$all.requests.create'] ?? [], + // 'usersRead' => $stats['users.$all.requests.read'] ?? [], + // 'usersUpdate' => $stats['users.$all.requests.update'] ?? [], + // 'usersDelete' => $stats['users.$all.requests.delete'] ?? [], + // 'sessionsCreate' => $stats['sessions.$all.requests.create'] ?? [], + // 'sessionsProviderCreate' => $stats["sessions.$provider.requests.create"] ?? [], + // 'sessionsDelete' => $stats['sessions.$all.requests.delete' ?? []] + // ]); + // } - $response->dynamic($usage, Response::MODEL_USAGE_USERS); + // $response->dynamic($usage, Response::MODEL_USAGE_USERS); }); diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index db35cebc6..ca2b7d612 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -8,7 +8,6 @@ use Appwrite\Event\Event; use Appwrite\Event\Func; use Appwrite\Event\Mail; use Appwrite\Messaging\Adapter\Realtime; -use Appwrite\Usage\Stats; use Appwrite\Utopia\Response; use Appwrite\Utopia\Request; use Utopia\App; @@ -17,7 +16,6 @@ use Utopia\Abuse\Abuse; use Utopia\Abuse\Adapters\TimeLimit; use Utopia\Cache\Adapter\Filesystem; use Utopia\Cache\Cache; -use Utopia\CLI\Console; use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; @@ -49,7 +47,7 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar return $label; }; -$databaseListener = function (string $event, Document $document, Stats $usage) { +$databaseListener = function (string $event, Document $document) { $multiplier = 1; if ($event === Database::EVENT_DOCUMENT_DELETE) { $multiplier = -1; @@ -58,34 +56,34 @@ $databaseListener = function (string $event, Document $document, Stats $usage) { $collection = $document->getCollection(); switch ($collection) { case 'users': - $usage->setParam('users.{scope}.count.total', 1 * $multiplier); + // $usage->setParam('users.{scope}.count.total', 1 * $multiplier); break; case 'databases': - $usage->setParam('databases.{scope}.count.total', 1 * $multiplier); + // $usage->setParam('databases.{scope}.count.total', 1 * $multiplier); break; case 'buckets': - $usage->setParam('buckets.{scope}.count.total', 1 * $multiplier); + // $usage->setParam('buckets.{scope}.count.total', 1 * $multiplier); break; case 'deployments': - $usage->setParam('deployments.{scope}.storage.size', $document->getAttribute('size') * $multiplier); + // $usage->setParam('deployments.{scope}.storage.size', $document->getAttribute('size') * $multiplier); break; default: - if (strpos($collection, 'bucket_') === 0) { - $usage - ->setParam('bucketId', $document->getAttribute('bucketId')) - ->setParam('files.{scope}.storage.size', $document->getAttribute('sizeOriginal') * $multiplier) - ->setParam('files.{scope}.count.total', 1 * $multiplier); - } elseif (strpos($collection, 'database_') === 0) { - $usage - ->setParam('databaseId', $document->getAttribute('databaseId')); - if (strpos($collection, '_collection_') !== false) { - $usage - ->setParam('collectionId', $document->getAttribute('$collectionId')) - ->setParam('documents.{scope}.count.total', 1 * $multiplier); - } else { - $usage->setParam('collections.{scope}.count.total', 1 * $multiplier); - } - } + // if (strpos($collection, 'bucket_') === 0) { + // $usage + // ->setParam('bucketId', $document->getAttribute('bucketId')) + // ->setParam('files.{scope}.storage.size', $document->getAttribute('sizeOriginal') * $multiplier) + // ->setParam('files.{scope}.count.total', 1 * $multiplier); + // } elseif (strpos($collection, 'database_') === 0) { + // $usage + // ->setParam('databaseId', $document->getAttribute('databaseId')); + // if (strpos($collection, '_collection_') !== false) { + // $usage + // ->setParam('collectionId', $document->getAttribute('$collectionId')) + // ->setParam('documents.{scope}.count.total', 1 * $multiplier); + // } else { + // $usage->setParam('collections.{scope}.count.total', 1 * $multiplier); + // } + // } break; } }; @@ -100,12 +98,11 @@ App::init() ->inject('events') ->inject('audits') ->inject('mails') - ->inject('usage') ->inject('deletes') ->inject('database') ->inject('dbForProject') ->inject('mode') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $events, Audit $audits, Mail $mails, Stats $usage, Delete $deletes, EventDatabase $database, Database $dbForProject, string $mode) use ($databaseListener) { + ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $events, Audit $audits, Mail $mails, Delete $deletes, EventDatabase $database, Database $dbForProject, string $mode) use ($databaseListener) { $route = $utopia->match($request); @@ -191,13 +188,13 @@ App::init() ->setProject($project) ->setUser($user); - $usage - ->setParam('projectInternalId', $project->getInternalId()) - ->setParam('projectId', $project->getId()) - ->setParam('project.{scope}.network.requests', 1) - ->setParam('httpMethod', $request->getMethod()) - ->setParam('project.{scope}.network.inbound', 0) - ->setParam('project.{scope}.network.outbound', 0); + // $usage + // ->setParam('projectInternalId', $project->getInternalId()) + // ->setParam('projectId', $project->getId()) + // ->setParam('project.{scope}.network.requests', 1) + // ->setParam('httpMethod', $request->getMethod()) + // ->setParam('project.{scope}.network.inbound', 0) + // ->setParam('project.{scope}.network.outbound', 0); $deletes->setProject($project); $database->setProject($project); @@ -327,13 +324,11 @@ App::shutdown() ->inject('project') ->inject('events') ->inject('audits') - ->inject('usage') ->inject('deletes') ->inject('database') - ->inject('mode') ->inject('dbForProject') ->inject('queueForFunctions') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Event $events, Audit $audits, Stats $usage, Delete $deletes, EventDatabase $database, string $mode, Database $dbForProject, Func $queueForFunctions) use ($parseLabel) { + ->action(function (App $utopia, Request $request, Response $response, Document $project, Event $events, Audit $audits, Delete $deletes, EventDatabase $database, Database $dbForProject, Func $queueForFunctions) use ($parseLabel) { $responsePayload = $response->getPayload(); @@ -494,30 +489,16 @@ App::shutdown() && $project->getId() && !empty($route->getLabel('sdk.namespace', null)) ) { // Don't calculate console usage on admin mode - $metric = $route->getLabel('usage.metric', ''); - $usageParams = $route->getLabel('usage.params', []); - - if (!empty($metric)) { - $usage->setParam($metric, 1); - foreach ($usageParams as $param) { - $param = $parseLabel($param, $responsePayload, $requestParams, $user); - $parts = explode(':', $param); - if (count($parts) != 2) { - throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Usage params not properly set'); - } - $usage->setParam($parts[0], $parts[1]); - } - } - + $fileSize = 0; $file = $request->getFiles('file'); if (!empty($file)) { $fileSize = (\is_array($file['size']) && isset($file['size'][0])) ? $file['size'][0] : $file['size']; } - $usage - ->setParam('project.{scope}.network.inbound', $request->getSize() + $fileSize) - ->setParam('project.{scope}.network.outbound', $response->getSize()) - ->submit(); + // $usage + // ->setParam('project.{scope}.network.inbound', $request->getSize() + $fileSize) + // ->setParam('project.{scope}.network.outbound', $response->getSize()) + // ->submit(); } }); diff --git a/app/init.php b/app/init.php index 6af338838..83603b83a 100644 --- a/app/init.php +++ b/app/init.php @@ -37,7 +37,6 @@ use Appwrite\Network\Validator\IP; use Appwrite\Network\Validator\URL; use Appwrite\OpenSSL\OpenSSL; use Appwrite\URL\URL as AppwriteURL; -use Appwrite\Usage\Stats; use Utopia\App; use Utopia\Validator\Range; use Utopia\Validator\WhiteList; @@ -689,30 +688,6 @@ $register->set('pools', function () { return $group; }); -$register->set('influxdb', function () { - // Register DB connection - $host = App::getEnv('_APP_INFLUXDB_HOST', ''); - $port = App::getEnv('_APP_INFLUXDB_PORT', ''); - - if (empty($host) || empty($port)) { - return; - } - $driver = new InfluxDB\Driver\Curl("http://{$host}:{$port}"); - $client = new InfluxDB\Client($host, $port, '', '', false, false, 5); - $client->setDriver($driver); - - return $client; -}); -$register->set('statsd', function () { - // Register DB connection - $host = App::getEnv('_APP_STATSD_HOST', 'telegraf'); - $port = App::getEnv('_APP_STATSD_PORT', 8125); - - $connection = new \Domnikl\Statsd\Connection\UdpSocket($host, $port); - $statsd = new \Domnikl\Statsd\Client($connection); - - return $statsd; -}); $register->set('smtp', function () { $mail = new PHPMailer(true); @@ -860,9 +835,6 @@ App::setResource('queue', function (Group $pools) { App::setResource('queueForFunctions', function (Connection $queue) { return new Func($queue); }, ['queue']); -App::setResource('usage', function ($register) { - return new Stats($register->get('statsd')); -}, ['register']); App::setResource('clients', function ($request, $console, $project) { $console->setAttribute('platforms', [ // Always allow current host '$collection' => ID::custom('platforms'), diff --git a/app/workers/builds.php b/app/workers/builds.php index d26f07ab7..1e6d2c8e2 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -6,7 +6,6 @@ use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Resque\Worker; use Appwrite\Utopia\Response\Model\Deployment; use Executor\Executor; -use Appwrite\Usage\Stats; use Utopia\Database\DateTime; use Utopia\App; use Utopia\CLI\Console; @@ -251,18 +250,18 @@ class BuildsV1 extends Worker /** Update usage stats */ if (App::getEnv('_APP_USAGE_STATS', 'enabled') === 'enabled') { - $statsd = $register->get('statsd'); - $usage = new Stats($statsd); - $usage - ->setParam('projectInternalId', $project->getInternalId()) - ->setParam('projectId', $project->getId()) - ->setParam('functionId', $function->getId()) - ->setParam('builds.{scope}.compute', 1) - ->setParam('buildStatus', $build->getAttribute('status', '')) - ->setParam('buildTime', $build->getAttribute('duration')) - ->setParam('networkRequestSize', 0) - ->setParam('networkResponseSize', 0) - ->submit(); + // $statsd = $register->get('statsd'); + // $usage = new Stats($statsd); + // $usage + // ->setParam('projectInternalId', $project->getInternalId()) + // ->setParam('projectId', $project->getId()) + // ->setParam('functionId', $function->getId()) + // ->setParam('builds.{scope}.compute', 1) + // ->setParam('buildStatus', $build->getAttribute('status', '')) + // ->setParam('buildTime', $build->getAttribute('duration')) + // ->setParam('networkRequestSize', 0) + // ->setParam('networkResponseSize', 0) + // ->submit(); } } } diff --git a/app/workers/functions.php b/app/workers/functions.php index 2333cb315..4f27f8031 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -6,7 +6,6 @@ use Utopia\Queue\Message; use Appwrite\Event\Event; use Appwrite\Event\Func; use Appwrite\Messaging\Adapter\Realtime; -use Appwrite\Usage\Stats; use Appwrite\Utopia\Response\Model\Execution; use Domnikl\Statsd\Client; use Executor\Executor; @@ -205,17 +204,17 @@ Server::setResource('execute', function () { /** Update usage stats */ if (App::getEnv('_APP_USAGE_STATS', 'enabled') === 'enabled') { - $usage = new Stats($statsd); - $usage - ->setParam('projectId', $project->getId()) - ->setParam('projectInternalId', $project->getInternalId()) - ->setParam('functionId', $function->getId()) // TODO: We should use functionInternalId in usage stats - ->setParam('executions.{scope}.compute', 1) - ->setParam('executionStatus', $execution->getAttribute('status', '')) - ->setParam('executionTime', $execution->getAttribute('duration')) - ->setParam('networkRequestSize', 0) - ->setParam('networkResponseSize', 0) - ->submit(); + // $usage = new Stats($statsd); + // $usage + // ->setParam('projectId', $project->getId()) + // ->setParam('projectInternalId', $project->getInternalId()) + // ->setParam('functionId', $function->getId()) // TODO: We should use functionInternalId in usage stats + // ->setParam('executions.{scope}.compute', 1) + // ->setParam('executionStatus', $execution->getAttribute('status', '')) + // ->setParam('executionTime', $execution->getAttribute('duration')) + // ->setParam('networkRequestSize', 0) + // ->setParam('networkResponseSize', 0) + // ->submit(); } }; }); diff --git a/composer.lock b/composer.lock index 7e3705f12..c41db9e92 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": "7a4830071d4d0c427adc32da23ed1856", + "content-hash": "4893e1c13630239fe6a20d1c652eb484", "packages": [ { "name": "adhocore/jwt", diff --git a/src/Appwrite/Platform/Tasks/Usage.php b/src/Appwrite/Platform/Tasks/Usage.php index fa677ea14..7779ab6b6 100644 --- a/src/Appwrite/Platform/Tasks/Usage.php +++ b/src/Appwrite/Platform/Tasks/Usage.php @@ -2,14 +2,9 @@ namespace Appwrite\Platform\Tasks; -use Appwrite\Usage\Calculators\TimeSeries; -use InfluxDB\Database as InfluxDatabase; -use Utopia\App; use Utopia\CLI\Console; use Utopia\Database\Database as UtopiaDatabase; -use Throwable; use Utopia\Platform\Action; -use Utopia\Registry\Registry; class Usage extends Action { @@ -23,38 +18,33 @@ class Usage extends Action $this ->desc('Schedules syncing data from influxdb to Appwrite console db') ->inject('dbForConsole') - ->inject('influxdb') - ->inject('register') ->inject('getProjectDB') ->inject('logError') - ->callback(fn ($dbForConsole, $influxDB, $register, $getProjectDB, $logError) => $this->action($dbForConsole, $influxDB, $register, $getProjectDB, $logError)); + // ->callback(fn ($dbForConsole, $influxDB, $register, $getProjectDB, $logError) => $this->action($dbForConsole, $influxDB, $register, $getProjectDB, $logError)) + ; } - protected function aggregateTimeseries(UtopiaDatabase $database, InfluxDatabase $influxDB, callable $logError): void + public function action() { - } + // Console::title('Usage Aggregation V1'); + // Console::success(APP_NAME . ' usage aggregation process v1 has started'); - public function action(UtopiaDatabase $dbForConsole, InfluxDatabase $influxDB, Registry $register, callable $getProjectDB, callable $logError) - { - Console::title('Usage Aggregation V1'); - Console::success(APP_NAME . ' usage aggregation process v1 has started'); + // $errorLogger = fn(Throwable $error, string $action = 'syncUsageStats') => $logError($error, "usage", $action); - $errorLogger = fn(Throwable $error, string $action = 'syncUsageStats') => $logError($error, "usage", $action); + // $interval = (int) App::getEnv('_APP_USAGE_AGGREGATION_INTERVAL', '30'); // 30 seconds (by default) + // $region = App::getEnv('region', 'default'); + // $usage = new TimeSeries($region, $dbForConsole, $influxDB, $getProjectDB, $register, $errorLogger); - $interval = (int) App::getEnv('_APP_USAGE_AGGREGATION_INTERVAL', '30'); // 30 seconds (by default) - $region = App::getEnv('region', 'default'); - $usage = new TimeSeries($region, $dbForConsole, $influxDB, $getProjectDB, $register, $errorLogger); + // Console::loop(function () use ($interval, $usage) { + // $now = date('d-m-Y H:i:s', time()); + // Console::info("[{$now}] Aggregating Timeseries Usage data every {$interval} seconds"); + // $loopStart = microtime(true); - Console::loop(function () use ($interval, $usage) { - $now = date('d-m-Y H:i:s', time()); - Console::info("[{$now}] Aggregating Timeseries Usage data every {$interval} seconds"); - $loopStart = microtime(true); + // $usage->collect(); - $usage->collect(); - - $loopTook = microtime(true) - $loopStart; - $now = date('d-m-Y H:i:s', time()); - Console::info("[{$now}] Aggregation took {$loopTook} seconds"); - }, $interval); + // $loopTook = microtime(true) - $loopStart; + // $now = date('d-m-Y H:i:s', time()); + // Console::info("[{$now}] Aggregation took {$loopTook} seconds"); + // }, $interval); } } diff --git a/src/Appwrite/Usage/Calculator.php b/src/Appwrite/Usage/Calculator.php deleted file mode 100644 index 37c130a34..000000000 --- a/src/Appwrite/Usage/Calculator.php +++ /dev/null @@ -1,15 +0,0 @@ -region = $region; - } - - abstract public function collect(): void; -} diff --git a/src/Appwrite/Usage/Calculators/TimeSeries.php b/src/Appwrite/Usage/Calculators/TimeSeries.php deleted file mode 100644 index e0a12b443..000000000 --- a/src/Appwrite/Usage/Calculators/TimeSeries.php +++ /dev/null @@ -1,557 +0,0 @@ - '1h', - 'startTime' => '-24 hours' - ], - [ - 'key' => '1d', - 'startTime' => '-30 days' - ] - ]; - - /** - * All the metrics that we are collecting - * - * @var array - */ - protected array $metrics = [ - 'project.$all.network.requests' => [ - 'table' => 'appwrite_usage_project_{scope}_network_requests', - ], - 'project.$all.network.bandwidth' => [ - 'table' => 'appwrite_usage_project_{scope}_network_bandwidth', - ], - 'project.$all.network.inbound' => [ - 'table' => 'appwrite_usage_project_{scope}_network_inbound', - ], - 'project.$all.network.outbound' => [ - 'table' => 'appwrite_usage_project_{scope}_network_outbound', - ], - /* Users service metrics */ - 'users.$all.requests.create' => [ - 'table' => 'appwrite_usage_users_{scope}_requests_create', - ], - 'users.$all.requests.read' => [ - 'table' => 'appwrite_usage_users_{scope}_requests_read', - ], - 'users.$all.requests.update' => [ - 'table' => 'appwrite_usage_users_{scope}_requests_update', - ], - 'users.$all.requests.delete' => [ - 'table' => 'appwrite_usage_users_{scope}_requests_delete', - ], - - 'databases.$all.requests.create' => [ - 'table' => 'appwrite_usage_databases_{scope}_requests_create', - ], - 'databases.$all.requests.read' => [ - 'table' => 'appwrite_usage_databases_{scope}_requests_read', - ], - 'databases.$all.requests.update' => [ - 'table' => 'appwrite_usage_databases_{scope}_requests_update', - ], - 'databases.$all.requests.delete' => [ - 'table' => 'appwrite_usage_databases_{scope}_requests_delete', - ], - - 'collections.$all.requests.create' => [ - 'table' => 'appwrite_usage_collections_{scope}_requests_create', - ], - 'collections.$all.requests.read' => [ - 'table' => 'appwrite_usage_collections_{scope}_requests_read', - ], - 'collections.$all.requests.update' => [ - 'table' => 'appwrite_usage_collections_{scope}_requests_update', - ], - 'collections.$all.requests.delete' => [ - 'table' => 'appwrite_usage_collections_{scope}_requests_delete', - ], - - 'documents.$all.requests.create' => [ - 'table' => 'appwrite_usage_documents_{scope}_requests_create', - ], - 'documents.$all.requests.read' => [ - 'table' => 'appwrite_usage_documents_{scope}_requests_read', - ], - 'documents.$all.requests.update' => [ - 'table' => 'appwrite_usage_documents_{scope}_requests_update', - ], - 'documents.$all.requests.delete' => [ - 'table' => 'appwrite_usage_documents_{scope}_requests_delete', - ], - - 'collections.databaseId.requests.create' => [ - 'table' => 'appwrite_usage_collections_{scope}_requests_create', - 'groupBy' => ['databaseId'], - ], - 'collections.databaseId.requests.read' => [ - 'table' => 'appwrite_usage_collections_{scope}_requests_read', - 'groupBy' => ['databaseId'], - ], - 'collections.databaseId.requests.update' => [ - 'table' => 'appwrite_usage_collections_{scope}_requests_update', - 'groupBy' => ['databaseId'], - ], - 'collections.databaseId.requests.delete' => [ - 'table' => 'appwrite_usage_collections_{scope}_requests_delete', - 'groupBy' => ['databaseId'], - ], - - 'documents.databaseId.requests.create' => [ - 'table' => 'appwrite_usage_documents_{scope}_requests_create', - 'groupBy' => ['databaseId'], - ], - 'documents.databaseId.requests.read' => [ - 'table' => 'appwrite_usage_documents_{scope}_requests_read', - 'groupBy' => ['databaseId'], - ], - 'documents.databaseId.requests.update' => [ - 'table' => 'appwrite_usage_documents_{scope}_requests_update', - 'groupBy' => ['databaseId'], - ], - 'documents.databaseId.requests.delete' => [ - 'table' => 'appwrite_usage_documents_{scope}_requests_delete', - 'groupBy' => ['databaseId'], - ], - - 'documents.databaseId/collectionId.requests.create' => [ - 'table' => 'appwrite_usage_documents_{scope}_requests_create', - 'groupBy' => ['databaseId', 'collectionId'], - ], - 'documents.databaseId/collectionId.requests.read' => [ - 'table' => 'appwrite_usage_documents_{scope}_requests_read', - 'groupBy' => ['databaseId', 'collectionId'], - ], - 'documents.databaseId/collectionId.requests.update' => [ - 'table' => 'appwrite_usage_documents_{scope}_requests_update', - 'groupBy' => ['databaseId', 'collectionId'], - ], - 'documents.databaseId/collectionId.requests.delete' => [ - 'table' => 'appwrite_usage_documents_{scope}_requests_delete', - 'groupBy' => ['databaseId', 'collectionId'], - ], - - 'buckets.$all.requests.create' => [ - 'table' => 'appwrite_usage_buckets_{scope}_requests_create', - ], - 'buckets.$all.requests.read' => [ - 'table' => 'appwrite_usage_buckets_{scope}_requests_read', - ], - 'buckets.$all.requests.update' => [ - 'table' => 'appwrite_usage_buckets_{scope}_requests_update', - ], - 'buckets.$all.requests.delete' => [ - 'table' => 'appwrite_usage_buckets_{scope}_requests_delete', - ], - - 'files.$all.requests.create' => [ - 'table' => 'appwrite_usage_files_{scope}_requests_create', - ], - 'files.$all.requests.read' => [ - 'table' => 'appwrite_usage_files_{scope}_requests_read', - ], - 'files.$all.requests.update' => [ - 'table' => 'appwrite_usage_files_{scope}_requests_update', - ], - 'files.$all.requests.delete' => [ - 'table' => 'appwrite_usage_files_{scope}_requests_delete', - ], - - 'files.bucketId.requests.create' => [ - 'table' => 'appwrite_usage_files_{scope}_requests_create', - 'groupBy' => ['bucketId'], - ], - 'files.bucketId.requests.read' => [ - 'table' => 'appwrite_usage_files_{scope}_requests_read', - 'groupBy' => ['bucketId'], - ], - 'files.bucketId.requests.update' => [ - 'table' => 'appwrite_usage_files_{scope}_requests_update', - 'groupBy' => ['bucketId'], - ], - 'files.bucketId.requests.delete' => [ - 'table' => 'appwrite_usage_files_{scope}_requests_delete', - 'groupBy' => ['bucketId'], - ], - - 'sessions.$all.requests.create' => [ - 'table' => 'appwrite_usage_sessions__{scope}_requests_create', - ], - 'sessions.provider.requests.create' => [ - 'table' => 'appwrite_usage_sessions_{scope}_requests_create', - 'groupBy' => ['provider'], - ], - 'sessions.$all.requests.delete' => [ - 'table' => 'appwrite_usage_sessions_{scope}_requests_delete', - ], - 'executions.$all.compute.total' => [ - 'table' => 'appwrite_usage_executions_{scope}_compute', - ], - 'builds.$all.compute.total' => [ - 'table' => 'appwrite_usage_builds_{scope}_compute', - ], - 'executions.$all.compute.failure' => [ - 'table' => 'appwrite_usage_executions_{scope}_compute', - 'filters' => [ - 'functionStatus' => 'failed', - ], - ], - 'builds.$all.compute.failure' => [ - 'table' => 'appwrite_usage_builds_{scope}_compute', - 'filters' => [ - 'functionStatus' => 'failed', - ], - ], - 'executions.$all.compute.success' => [ - 'table' => 'appwrite_usage_executions_{scope}_compute', - 'filters' => [ - 'functionStatus' => 'success', - ], - ], - 'builds.$all.compute.success' => [ - 'table' => 'appwrite_usage_builds_{scope}_compute', - 'filters' => [ - 'functionStatus' => 'success', - ], - ], - 'executions.functionId.compute.total' => [ - 'table' => 'appwrite_usage_executions_{scope}_compute', - 'groupBy' => ['functionId'], - ], - 'builds.functionId.compute.total' => [ - 'table' => 'appwrite_usage_builds_{scope}_compute', - 'groupBy' => ['functionId'], - ], - - 'executions.functionId.compute.failure' => [ - 'table' => 'appwrite_usage_executions_{scope}_compute', - 'groupBy' => ['functionId'], - 'filters' => [ - 'functionStatus' => 'failed', - ], - ], - 'builds.functionId.compute.failure' => [ - 'table' => 'appwrite_usage_builds_{scope}_compute', - 'groupBy' => ['functionId'], - 'filters' => [ - 'functionBuildStatus' => 'failed', - ], - ], - 'executions.functionId.compute.success' => [ - 'table' => 'appwrite_usage_executions_{scope}_compute', - 'groupBy' => ['functionId'], - 'filters' => [ - 'functionStatus' => 'success', - ], - ], - 'builds.functionId.compute.success' => [ - 'table' => 'appwrite_usage_builds_{scope}_compute', - 'groupBy' => ['functionId'], - 'filters' => [ - 'functionBuildStatus' => 'success', - ], - ], - - // counters - 'users.$all.count.total' => [ - 'table' => 'appwrite_usage_users_{scope}_count_total', - ], - 'buckets.$all.count.total' => [ - 'table' => 'appwrite_usage_buckets_{scope}_count_total', - ], - 'files.$all.count.total' => [ - 'table' => 'appwrite_usage_files_{scope}_count_total', - ], - 'files.bucketId.count.total' => [ - 'table' => 'appwrite_usage_files_{scope}_count_total', - 'groupBy' => ['bucketId'] - ], - 'databases.$all.count.total' => [ - 'table' => 'appwrite_usage_databases_{scope}_count_total', - ], - 'collections.$all.count.total' => [ - 'table' => 'appwrite_usage_collections_{scope}_count_total', - ], - 'documents.$all.count.total' => [ - 'table' => 'appwrite_usage_documents_{scope}_count_total', - ], - 'collections.databaseId.count.total' => [ - 'table' => 'appwrite_usage_collections_{scope}_count_total', - 'groupBy' => ['databaseId'] - ], - 'documents.databaseId.count.total' => [ - 'table' => 'appwrite_usage_documents_{scope}_count_total', - 'groupBy' => ['databaseId'] - ], - 'documents.databaseId/collectionId.count.total' => [ - 'table' => 'appwrite_usage_documents_{scope}_count_total', - 'groupBy' => ['databaseId', 'collectionId'] - ], - 'deployments.$all.storage.size' => [ - 'table' => 'appwrite_usage_deployments_{scope}_storage_size', - ], - 'project.$all.storage.size' => [ - 'table' => 'appwrite_usage_project_{scope}_storage_size', - ], - 'files.$all.storage.size' => [ - 'table' => 'appwrite_usage_files_{scope}_storage_size', - ], - 'files.$bucketId.storage.size' => [ - 'table' => 'appwrite_usage_files_{scope}_storage_size', - 'groupBy' => ['bucketId'] - ], - - 'builds.$all.compute.time' => [ - 'table' => 'appwrite_usage_executions_{scope}_compute_time', - ], - 'executions.$all.compute.time' => [ - 'table' => 'appwrite_usage_executions_{scope}_compute_time', - ], - - 'executions.functionId.compute.time' => [ - 'table' => 'appwrite_usage_executions_{scope}_compute_time', - 'groupBy' => ['functionId'], - ], - 'builds.functionId.compute.time' => [ - 'table' => 'appwrite_usage_builds_{scope}_compute_time', - 'groupBy' => ['functionId'], - ], - - 'project.$all.compute.time' => [ // Built time + execution time - 'table' => 'appwrite_usage_project_{scope}_compute_time', - 'groupBy' => ['functionId'], - ], - - 'deployments.$all.storage.size' => [ - 'table' => 'appwrite_usage_deployments_{scope}_storage_size' - ], - 'project.$all.storage.size' => [ - 'table' => 'appwrite_usage_project_{scope}_storage_size' - ], - 'files.$all.storage.size' => [ - 'table' => 'appwrite_usage_files_{scope}_storage_size' - ], - 'files.bucketId.storage.size' => [ - 'table' => 'appwrite_usage_files_{scope}_storage_size', - 'groupBy' => ['bucketId'] - ] - ]; - - public function __construct(string $region, Database $database, InfluxDatabase $influxDB, callable $getProjectDB, Registry $register, callable $errorHandler = null) - { - parent::__construct($region); - $this->database = $database; - $this->influxDB = $influxDB; - $this->getProjectDB = $getProjectDB; - $this->register = $register; - $this->errorHandler = $errorHandler; - } - - /** - * Create or Update Mertic - * Create or update each metric in the stats collection for the given project - * - * @param string $projectId - * @param int $time - * @param string $period - * @param string $metric - * @param int $value - * @param int $type - * - * @return void - */ - private function createOrUpdateMetric(string $projectId, string $time, string $period, string $metric, int $value, int $type): void - { - $id = \md5("{$time}_{$period}_{$metric}"); - $project = $this->database->getDocument('projects', $projectId); - $database = call_user_func($this->getProjectDB, $project); - - try { - $document = $database->getDocument('stats', $id); - if ($document->isEmpty()) { - $database->createDocument('stats', new Document([ - '$id' => $id, - 'period' => $period, - 'time' => $time, - 'metric' => $metric, - 'value' => $value, - 'type' => $type, - 'region' => $this->region, - ])); - } else { - $database->updateDocument( - 'stats', - $document->getId(), - $document->setAttribute('value', $value) - ); - } - } catch (\Exception $e) { // if projects are deleted this might fail - if (is_callable($this->errorHandler)) { - call_user_func($this->errorHandler, $e, "sync_project_{$projectId}_metric_{$metric}"); - } else { - throw $e; - } - } - - $this->register->get('pools')->reclaim(); - } - - /** - * Sync From InfluxDB - * Sync stats from influxDB to stats collection in the Appwrite database - * - * @param string $metric - * @param array $options - * @param array $period - * - * @return void - */ - private function syncFromInfluxDB(string $metric, array $options, array $period): void - { - $start = DateTime::createFromFormat('U', \strtotime($period['startTime']))->format(DateTime::RFC3339); - if (!empty($this->latestTime[$metric][$period['key']])) { - $start = $this->latestTime[$metric][$period['key']]; - } - $end = (new DateTime())->format(DateTime::RFC3339); - - $table = $options['table']; //Which influxdb table to query for this metric - $groupBy = empty($options['groupBy']) ? '' : ', ' . implode(', ', array_map(fn($groupBy) => '"' . $groupBy . '" ', $options['groupBy'])); //Some sub level metrics may be grouped by other tags like collectionId, bucketId, etc - - $filters = $options['filters'] ?? []; // Some metrics might have additional filters, like function's status - if (!empty($filters)) { - $filters = ' AND ' . implode(' AND ', array_map(fn ($filter, $value) => "\"{$filter}\"='{$value}'", array_keys($filters), array_values($filters))); - } else { - $filters = ''; - } - - $query = "SELECT sum(value) AS \"value\" "; - $query .= "FROM \"{$table}\" "; - $query .= "WHERE \"time\" > '{$start}' "; - $query .= "AND \"time\" < '{$end}' "; - $query .= "AND \"metric_type\"='counter' {$filters} "; - $query .= "GROUP BY time({$period['key']}), \"projectId\" {$groupBy} "; - $query .= "FILL(null)"; - - try { - $result = $this->influxDB->query($query); - $points = $result->getPoints(); - foreach ($points as $point) { - $projectId = $point['projectId']; - - if (!empty($projectId) && $projectId !== 'console') { - $metricUpdated = $metric; - if (!empty($groupBy)) { - foreach ($options['groupBy'] as $groupBy) { - $groupedBy = $point[$groupBy] ?? ''; - if (empty($groupedBy)) { - continue; - } - $metricUpdated = str_replace($groupBy, $groupedBy, $metricUpdated); - } - } - - $value = (!empty($point['value'])) ? $point['value'] : 0; - - $this->createOrUpdateMetric( - $point['projectId'], - $point['time'], - $period['key'], - $metricUpdated, - $value, - 0 - ); - $this->latestTime[$metric][$period['key']] = $point['time']; - } - } - } catch (\Exception $e) { // if projects are deleted this might fail - if (is_callable($this->errorHandler)) { - call_user_func($this->errorHandler, $e, "sync_metric_{$metric}_influxdb"); - } else { - throw $e; - } - } - } - - /** - * Collect Stats - * Collect all the stats from Influd DB to Database - * - * @return void - */ - public function collect(): void - { - foreach ($this->periods as $period) { - foreach ($this->metrics as $metric => $options) { //for each metrics - try { - $this->syncFromInfluxDB($metric, $options, $period); - } catch (\Exception $e) { - if (is_callable($this->errorHandler)) { - call_user_func($this->errorHandler, $e); - } else { - throw $e; - } - } - } - } - } -} diff --git a/src/Appwrite/Usage/Stats.php b/src/Appwrite/Usage/Stats.php deleted file mode 100644 index e6e005666..000000000 --- a/src/Appwrite/Usage/Stats.php +++ /dev/null @@ -1,225 +0,0 @@ -statsd = $statsd; - } - - /** - * @param string $key - * @param mixed $value - * - * @return $this - */ - public function setParam(string $key, $value): self - { - $this->params[$key] = $value; - - return $this; - } - - /** - * @param string $key - * - * @return mixed|null - */ - public function getParam(string $key) - { - return (isset($this->params[$key])) ? $this->params[$key] : null; - } - - /** - * @param string $namespace - * - * @return $this - */ - public function setNamespace(string $namespace): self - { - $this->namespace = $namespace; - - return $this; - } - - /** - * @return string - */ - public function getNamespace() - { - return $this->namespace; - } - - /** - * Submit data to StatsD. - * Send various metrics to StatsD based on the parameters that are set - * @return void - */ - public function submit(): void - { - $projectId = $this->params['projectId'] ?? ''; - $projectInternalId = $this->params['projectInternalId']; - $tags = ",projectInternalId={$projectInternalId},projectId={$projectId},version=" . App::getEnv('_APP_VERSION', 'UNKNOWN'); - - // the global namespace is prepended to every key (optional) - $this->statsd->setNamespace($this->namespace); - - $httpRequest = $this->params['project.{scope}.network.requests'] ?? 0; - $httpMethod = $this->params['httpMethod'] ?? ''; - if ($httpRequest >= 1) { - $this->statsd->increment('project.{scope}.network.requests' . $tags . ',method=' . \strtolower($httpMethod)); - } - - $inbound = $this->params['project.{scope}.network.inbound'] ?? 0; - $outbound = $this->params['project.{scope}.network.outbound'] ?? 0; - $this->statsd->count('project.{scope}.network.inbound' . $tags, $inbound); - $this->statsd->count('project.{scope}.network.outbound' . $tags, $outbound); - $this->statsd->count('project.{scope}.network.bandwidth' . $tags, $inbound + $outbound); - - $usersMetrics = [ - 'users.{scope}.requests.create', - 'users.{scope}.requests.read', - 'users.{scope}.requests.update', - 'users.{scope}.requests.delete', - 'users.{scope}.count.total', - ]; - - foreach ($usersMetrics as $metric) { - $value = $this->params[$metric] ?? 0; - if ($value === 1 || $value === -1) { - $this->statsd->count($metric . $tags, $value); - } - } - - $dbMetrics = [ - 'databases.{scope}.requests.create', - 'databases.{scope}.requests.read', - 'databases.{scope}.requests.update', - 'databases.{scope}.requests.delete', - 'collections.{scope}.requests.create', - 'collections.{scope}.requests.read', - 'collections.{scope}.requests.update', - 'collections.{scope}.requests.delete', - 'documents.{scope}.requests.create', - 'documents.{scope}.requests.read', - 'documents.{scope}.requests.update', - 'documents.{scope}.requests.delete', - 'databases.{scope}.count.total', - 'collections.{scope}.count.total', - 'documents.{scope}.count.total' - ]; - - foreach ($dbMetrics as $metric) { - $value = $this->params[$metric] ?? 0; - if ($value === 1 || $value === -1) { - $dbTags = $tags . ",collectionId=" . ($this->params['collectionId'] ?? '') . ",databaseId=" . ($this->params['databaseId'] ?? ''); - $this->statsd->count($metric . $dbTags, $value); - } - } - - $storageMertics = [ - 'buckets.{scope}.requests.create', - 'buckets.{scope}.requests.read', - 'buckets.{scope}.requests.update', - 'buckets.{scope}.requests.delete', - 'files.{scope}.requests.create', - 'files.{scope}.requests.read', - 'files.{scope}.requests.update', - 'files.{scope}.requests.delete', - 'buckets.{scope}.count.total', - 'files.{scope}.count.total', - 'files.{scope}.storage.size' - ]; - - foreach ($storageMertics as $metric) { - $value = $this->params[$metric] ?? 0; - if ($value !== 0) { - $storageTags = $tags . ",bucketId=" . ($this->params['bucketId'] ?? ''); - $this->statsd->count($metric . $storageTags, $value); - } - } - - $sessionsMetrics = [ - 'sessions.{scope}.requests.create', - 'sessions.{scope}.requests.update', - 'sessions.{scope}.requests.delete', - ]; - - foreach ($sessionsMetrics as $metric) { - $value = $this->params[$metric] ?? 0; - if ($value >= 1) { - $sessionTags = $tags . ",provider=" . ($this->params['provider'] ?? ''); - $this->statsd->count($metric . $sessionTags, $value); - } - } - - $functionId = $this->params['functionId'] ?? ''; - $functionExecution = $this->params['executions.{scope}.compute'] ?? 0; - $functionExecutionTime = ($this->params['executionTime'] ?? 0) * 1000; // ms - $functionExecutionStatus = $this->params['executionStatus'] ?? ''; - - $functionBuild = $this->params['builds.{scope}.compute'] ?? 0; - $functionBuildTime = ($this->params['buildTime'] ?? 0) * 1000; // ms - $functionBuildStatus = $this->params['buildStatus'] ?? ''; - $functionCompute = $functionExecutionTime + $functionBuildTime; - $functionTags = $tags . ',functionId=' . $functionId; - - $deploymentSize = $this->params['deployment.{scope}.storage.size'] ?? 0; - $storageSize = $this->params['files.{scope}.storage.size'] ?? 0; - if ($deploymentSize + $storageSize > 0 || $deploymentSize + $storageSize <= -1) { - $this->statsd->count('project.{scope}.storage.size' . $tags, $deploymentSize + $storageSize); - } - - if ($deploymentSize !== 0) { - $this->statsd->count('deployments.{scope}.storage.size' . $functionTags, $deploymentSize); - } - - if ($functionExecution >= 1) { - $this->statsd->increment('executions.{scope}.compute' . $functionTags . ',functionStatus=' . $functionExecutionStatus); - if ($functionExecutionTime > 0) { - $this->statsd->count('executions.{scope}.compute.time' . $functionTags, $functionExecutionTime); - } - } - if ($functionBuild >= 1) { - $this->statsd->increment('builds.{scope}.compute' . $functionTags . ',functionBuildStatus=' . $functionBuildStatus); - $this->statsd->count('builds.{scope}.compute.time' . $functionTags, $functionBuildTime); - } - if ($functionBuild + $functionExecution >= 1) { - $this->statsd->count('project.{scope}.compute.time' . $functionTags, $functionCompute); - } - - $this->reset(); - } - - public function reset(): self - { - $this->params = []; - $this->namespace = 'appwrite.usage'; - - return $this; - } -} From db345fae415ac5d815e1a4b9a4f83a70bd89a7c9 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Thu, 24 Nov 2022 09:53:52 +0200 Subject: [PATCH 02/94] WIP --- app/config/collections.php | 3 + app/controllers/general.php | 2 + app/controllers/shared/api.php | 130 +++++++++++++--------------- app/controllers/shared/api/auth.php | 62 +++++++++++++ src/Appwrite/Event/Usage.php | 53 ++++++++++++ 5 files changed, 179 insertions(+), 71 deletions(-) create mode 100644 app/controllers/shared/api/auth.php create mode 100644 src/Appwrite/Event/Usage.php diff --git a/app/config/collections.php b/app/config/collections.php index d23f452b0..68d4c24ff 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -61,6 +61,7 @@ $collections = [ ], ], ], + 'collections' => [ '$collection' => ID::custom('databases'), '$id' => ID::custom('collections'), @@ -3234,6 +3235,7 @@ $collections = [ ], ] ], + 'cache' => [ '$collection' => Database::METADATA, '$id' => 'cache', @@ -3290,6 +3292,7 @@ $collections = [ ], ], ], + 'files' => [ '$collection' => ID::custom('buckets'), '$id' => ID::custom('files'), diff --git a/app/controllers/general.php b/app/controllers/general.php index 0c10dd46e..98449503e 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -631,6 +631,8 @@ App::get('/.well-known/acme-challenge') }); include_once __DIR__ . '/shared/api.php'; +include_once __DIR__ . '/shared/api/auth.php'; +include_once __DIR__ . '/shared/api/cache.php'; foreach (Config::getParam('services', []) as $service) { include_once $service['controller']; diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index ca2b7d612..4e4f7818a 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -7,6 +7,7 @@ use Appwrite\Event\Delete; use Appwrite\Event\Event; use Appwrite\Event\Func; use Appwrite\Event\Mail; +use Appwrite\Event\Usage; use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Utopia\Response; use Appwrite\Utopia\Request; @@ -47,25 +48,64 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar return $label; }; -$databaseListener = function (string $event, Document $document) { - $multiplier = 1; +$databaseListener = function (string $event, Document $document, Document $project, Usage $usage) { + $value = 1; + if ($event === Database::EVENT_DOCUMENT_DELETE) { - $multiplier = -1; + $value = -1; } - $collection = $document->getCollection(); - switch ($collection) { + switch ($document->getCollection()) { case 'users': - // $usage->setParam('users.{scope}.count.total', 1 * $multiplier); + $usage->addMetric("{$project->getId()}", "users", $value); // per project + break; + case 'teams': + $usage->addMetric("{$project->getId()}", "teams", $value); // per project + break; + case 'sessions': + $usage->addMetric("{$project->getId()}", "sessions", $value); // per project break; case 'databases': - // $usage->setParam('databases.{scope}.count.total', 1 * $multiplier); + $usage->addMetric("{$project->getId()}", "databases", $value); // per project + break; + case 'collections': + $usage->addMetric("{$project->getId()}.[DATABASE_ID]", "collections", $value); // per database + $usage->addMetric("{$project->getId()}", "collections", $value); // per project + break; + case 'documents': + $usage->addMetric("{$project->getId()}.[DATABASE_ID].[COLLECTION_ID]", "documents", $value); // per collection + $usage->addMetric("{$project->getId()}.[DATABASE_ID]", "documents", $value); // per database + $usage->addMetric("{$project->getId()}", "documents", $value); // per project break; case 'buckets': - // $usage->setParam('buckets.{scope}.count.total', 1 * $multiplier); + $usage->addMetric("{$project->getId()}", "buckets", $value); // per project + break; + case 'files': + $usage->addMetric("{$project->getId()}.[BUCKET_ID]", "files", $value); // per bucket + $usage->addMetric("{$project->getId()}.[BUCKET_ID]", "files.storage", $document->getAttribute('sizeOriginal') * $value); // per bucket + $usage->addMetric("{$project->getId()}", "files", $value); // per project + $usage->addMetric("{$project->getId()}", "files.storage", $document->getAttribute('sizeOriginal') * $value); // per project + break; + case 'functions': + $usage->addMetric("{$project->getId()}", "functions", $value); // per project break; case 'deployments': - // $usage->setParam('deployments.{scope}.storage.size', $document->getAttribute('size') * $multiplier); + $usage->addMetric("{$project->getId()}.[FUNCTION_ID]", "deployments", $value); // per function + $usage->addMetric("{$project->getId()}.[FUNCTION_ID]", "deployments.storage", $document->getAttribute('size') * $value); // per function + $usage->addMetric("{$project->getId()}", "deployments", $value); // per project + $usage->addMetric("{$project->getId()}", "deployments.storage", $document->getAttribute('size') * $value); // per project + break; + case 'builds': + $usage->addMetric("{$project->getId()}.[FUNCTION_ID]", "builds", $value); // per function + $usage->addMetric("{$project->getId()}.[FUNCTION_ID]", "builds.storage", $document->getAttribute('size') * $value); // per function + $usage->addMetric("{$project->getId()}", "builds", $value); // per project + $usage->addMetric("{$project->getId()}", "builds.storage", $document->getAttribute('size') * $value); // per project + break; + case 'executions': + $usage->addMetric("{$project->getId()}.[FUNCTION_ID]", "executions", $value); // per function + $usage->addMetric("{$project->getId()}.[FUNCTION_ID]", "executions.compute", $document->getAttribute('duration') * $value); // per function + $usage->addMetric("{$project->getId()}", "executions", $value); // per project + $usage->addMetric("{$project->getId()}", "executions.compute", $document->getAttribute('duration') * $value); // per project break; default: // if (strpos($collection, 'bucket_') === 0) { @@ -121,11 +161,11 @@ App::init() foreach ($abuseKeyLabel as $abuseKey) { $timeLimit = new TimeLimit($abuseKey, $route->getLabel('abuse-limit', 0), $route->getLabel('abuse-time', 3600), $dbForProject); $timeLimit - ->setParam('{userId}', $user->getId()) - ->setParam('{userAgent}', $request->getUserAgent('')) - ->setParam('{ip}', $request->getIP()) - ->setParam('{url}', $request->getHostname() . $route->getPath()) - ->setParam('{method}', $request->getMethod()); + ->setParam('{userId}', $user->getId()) + ->setParam('{userAgent}', $request->getUserAgent('')) + ->setParam('{ip}', $request->getIP()) + ->setParam('{url}', $request->getHostname() . $route->getPath()) + ->setParam('{method}', $request->getMethod()); $timeLimitArray[] = $timeLimit; } @@ -199,9 +239,10 @@ App::init() $deletes->setProject($project); $database->setProject($project); - $dbForProject->on(Database::EVENT_DOCUMENT_CREATE, fn ($event, Document $document) => $databaseListener($event, $document, $usage)); - - $dbForProject->on(Database::EVENT_DOCUMENT_DELETE, fn ($event, Document $document) => $databaseListener($event, $document, $usage)); + $dbForProject + ->on(Database::EVENT_DOCUMENT_CREATE, fn ($event, Document $document) => $databaseListener($event, $document)) + ->on(Database::EVENT_DOCUMENT_DELETE, fn ($event, Document $document) => $databaseListener($event, $document)) + ; $useCache = $route->getLabel('cache', false); @@ -262,60 +303,6 @@ App::init() } }); -App::init() - ->groups(['auth']) - ->inject('utopia') - ->inject('request') - ->inject('project') - ->action(function (App $utopia, Request $request, Document $project) { - - $route = $utopia->match($request); - - $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); - $isAppUser = Auth::isAppUser(Authorization::getRoles()); - - if ($isAppUser || $isPrivilegedUser) { // Skip limits for app and console devs - return; - } - - $auths = $project->getAttribute('auths', []); - switch ($route->getLabel('auth.type', '')) { - case 'emailPassword': - if (($auths['emailPassword'] ?? true) === false) { - throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Email / Password authentication is disabled for this project'); - } - break; - - case 'magic-url': - if ($project->getAttribute('usersAuthMagicURL', true) === false) { - throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Magic URL authentication is disabled for this project'); - } - break; - - case 'anonymous': - if (($auths['anonymous'] ?? true) === false) { - throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Anonymous authentication is disabled for this project'); - } - break; - - case 'invites': - if (($auths['invites'] ?? true) === false) { - throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Invites authentication is disabled for this project'); - } - break; - - case 'jwt': - if (($auths['JWT'] ?? true) === false) { - throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'JWT authentication is disabled for this project'); - } - break; - - default: - throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Unsupported authentication route'); - break; - } - }); - App::shutdown() ->groups(['api']) ->inject('utopia') @@ -336,6 +323,7 @@ App::shutdown() if (empty($events->getPayload())) { $events->setPayload($responsePayload); } + /** * Trigger functions. */ diff --git a/app/controllers/shared/api/auth.php b/app/controllers/shared/api/auth.php new file mode 100644 index 000000000..a6c47579a --- /dev/null +++ b/app/controllers/shared/api/auth.php @@ -0,0 +1,62 @@ +groups(['auth']) + ->inject('utopia') + ->inject('request') + ->inject('project') + ->action(function (App $utopia, Request $request, Document $project) { + + $route = $utopia->match($request); + + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + $isAppUser = Auth::isAppUser(Authorization::getRoles()); + + if ($isAppUser || $isPrivilegedUser) { // Skip limits for app and console devs + return; + } + + $auths = $project->getAttribute('auths', []); + switch ($route->getLabel('auth.type', '')) { + case 'emailPassword': + if (($auths['emailPassword'] ?? true) === false) { + throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Email / Password authentication is disabled for this project'); + } + break; + + case 'magic-url': + if ($project->getAttribute('usersAuthMagicURL', true) === false) { + throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Magic URL authentication is disabled for this project'); + } + break; + + case 'anonymous': + if (($auths['anonymous'] ?? true) === false) { + throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Anonymous authentication is disabled for this project'); + } + break; + + case 'invites': + if (($auths['invites'] ?? true) === false) { + throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Invites authentication is disabled for this project'); + } + break; + + case 'jwt': + if (($auths['JWT'] ?? true) === false) { + throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'JWT authentication is disabled for this project'); + } + break; + + default: + throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Unsupported authentication route'); + break; + } + }); \ No newline at end of file diff --git a/src/Appwrite/Event/Usage.php b/src/Appwrite/Event/Usage.php new file mode 100644 index 000000000..813d8ec5c --- /dev/null +++ b/src/Appwrite/Event/Usage.php @@ -0,0 +1,53 @@ +metrics[] = [ + 'namespace' => $namespace, + 'key' => $key, + 'value' => $value, + ]; + + return $this; + } + + /** + * Executes the function event and sends it to the functions worker. + * + * @return bool + */ + public function trigger(): string|bool + { + $client = new Client($this->queue, $this->connection); + + return $client->enqueue([ + 'project' => $this->project, + 'user' => $this->user, + 'type' => $this->type, + 'payload' => $this->payload, + 'metrics' => $this->metrics, + ]); + } +} From b71bba2a9c691707f5e87c7f9954a1fe1beea25e Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 4 Dec 2022 19:06:23 +0200 Subject: [PATCH 03/94] updates --- Dockerfile | 3 +- app/controllers/general.php | 1 - app/controllers/shared/api.php | 105 +++++++++++++++++---------------- app/init.php | 4 ++ app/worker.php | 2 +- app/workers/usage.php | 34 +++++++++++ bin/worker-usage | 3 + docker-compose.yml | 38 ++++++++++++ src/Appwrite/Event/Event.php | 3 + src/Appwrite/Event/Usage.php | 12 ++-- 10 files changed, 142 insertions(+), 63 deletions(-) create mode 100644 app/workers/usage.php create mode 100644 bin/worker-usage diff --git a/Dockerfile b/Dockerfile index 7aa447d27..f233107bd 100755 --- a/Dockerfile +++ b/Dockerfile @@ -323,7 +323,8 @@ RUN chmod +x /usr/local/bin/doctor && \ chmod +x /usr/local/bin/worker-builds && \ chmod +x /usr/local/bin/worker-mails && \ chmod +x /usr/local/bin/worker-messaging && \ - chmod +x /usr/local/bin/worker-webhooks + chmod +x /usr/local/bin/worker-webhooks && \ + chmod +x /usr/local/bin/worker-usage # Letsencrypt Permissions RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/ diff --git a/app/controllers/general.php b/app/controllers/general.php index 98449503e..d251e4ab9 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -632,7 +632,6 @@ App::get('/.well-known/acme-challenge') include_once __DIR__ . '/shared/api.php'; include_once __DIR__ . '/shared/api/auth.php'; -include_once __DIR__ . '/shared/api/cache.php'; foreach (Config::getParam('services', []) as $service) { include_once $service['controller']; diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 4e4f7818a..0d16a4641 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -48,64 +48,64 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar return $label; }; -$databaseListener = function (string $event, Document $document, Document $project, Usage $usage) { +$databaseListener = function (string $event, Document $document, Document $project, Usage $queueForUsage) { $value = 1; if ($event === Database::EVENT_DOCUMENT_DELETE) { $value = -1; } - - switch ($document->getCollection()) { - case 'users': - $usage->addMetric("{$project->getId()}", "users", $value); // per project + var_dump($document->getCollection()); + switch (true) { + case $document->getCollection() === 'users': + $queueForUsage->addMetric("{$project->getId()}", "users", $value); // per project break; - case 'teams': - $usage->addMetric("{$project->getId()}", "teams", $value); // per project + case $document->getCollection() === 'teams': + $queueForUsage->addMetric("{$project->getId()}", "teams", $value); // per project break; - case 'sessions': - $usage->addMetric("{$project->getId()}", "sessions", $value); // per project + case $document->getCollection() === 'sessions': + $queueForUsage->addMetric("{$project->getId()}", "sessions", $value); // per project break; - case 'databases': - $usage->addMetric("{$project->getId()}", "databases", $value); // per project + case $document->getCollection() === 'databases': + $queueForUsage->addMetric("{$project->getId()}", "databases", $value); // per project break; - case 'collections': - $usage->addMetric("{$project->getId()}.[DATABASE_ID]", "collections", $value); // per database - $usage->addMetric("{$project->getId()}", "collections", $value); // per project + case str_starts_with($document->getCollection(), 'database'): // collections + $queueForUsage->addMetric("{$project->getId()}.{$document['databaseId']}", "collections", $value); // per database + $queueForUsage->addMetric("{$project->getId()}", "collections", $value); // per project break; - case 'documents': - $usage->addMetric("{$project->getId()}.[DATABASE_ID].[COLLECTION_ID]", "documents", $value); // per collection - $usage->addMetric("{$project->getId()}.[DATABASE_ID]", "documents", $value); // per database - $usage->addMetric("{$project->getId()}", "documents", $value); // per project + case $document->getCollection() === 'documents': + $queueForUsage->addMetric("{$project->getId()}.{$document['databaseId']}.{$document['collectionId']}", "documents", $value); // per collection + $queueForUsage->addMetric("{$project->getId()}.{$document['databaseId']}", "documents", $value); // per database + $queueForUsage->addMetric("{$project->getId()}", "documents", $value); // per project break; - case 'buckets': - $usage->addMetric("{$project->getId()}", "buckets", $value); // per project + case $document->getCollection() === 'buckets': + $queueForUsage->addMetric("{$project->getId()}", "buckets", $value); // per project break; - case 'files': - $usage->addMetric("{$project->getId()}.[BUCKET_ID]", "files", $value); // per bucket - $usage->addMetric("{$project->getId()}.[BUCKET_ID]", "files.storage", $document->getAttribute('sizeOriginal') * $value); // per bucket - $usage->addMetric("{$project->getId()}", "files", $value); // per project - $usage->addMetric("{$project->getId()}", "files.storage", $document->getAttribute('sizeOriginal') * $value); // per project + case $document->getCollection() === 'files': + $queueForUsage->addMetric("{$project->getId()}.{$document['bucketId']}", "files", $value); // per bucket + $queueForUsage->addMetric("{$project->getId()}.{$document['bucketId']}", "files.storage", $document->getAttribute('sizeOriginal') * $value); // per bucket + $queueForUsage->addMetric("{$project->getId()}", "files", $value); // per project + $queueForUsage->addMetric("{$project->getId()}", "files.storage", $document->getAttribute('sizeOriginal') * $value); // per project break; - case 'functions': - $usage->addMetric("{$project->getId()}", "functions", $value); // per project + case $document->getCollection() === 'functions': + $queueForUsage->addMetric("{$project->getId()}", "functions", $value); // per project break; - case 'deployments': - $usage->addMetric("{$project->getId()}.[FUNCTION_ID]", "deployments", $value); // per function - $usage->addMetric("{$project->getId()}.[FUNCTION_ID]", "deployments.storage", $document->getAttribute('size') * $value); // per function - $usage->addMetric("{$project->getId()}", "deployments", $value); // per project - $usage->addMetric("{$project->getId()}", "deployments.storage", $document->getAttribute('size') * $value); // per project + case $document->getCollection() === 'deployments': + $queueForUsage->addMetric("{$project->getId()}.{$document['functionId']}", "deployments", $value); // per function + $queueForUsage->addMetric("{$project->getId()}.{$document['functionId']}", "deployments.storage", $document->getAttribute('size') * $value); // per function + $queueForUsage->addMetric("{$project->getId()}", "deployments", $value); // per project + $queueForUsage->addMetric("{$project->getId()}", "deployments.storage", $document->getAttribute('size') * $value); // per project break; - case 'builds': - $usage->addMetric("{$project->getId()}.[FUNCTION_ID]", "builds", $value); // per function - $usage->addMetric("{$project->getId()}.[FUNCTION_ID]", "builds.storage", $document->getAttribute('size') * $value); // per function - $usage->addMetric("{$project->getId()}", "builds", $value); // per project - $usage->addMetric("{$project->getId()}", "builds.storage", $document->getAttribute('size') * $value); // per project + case $document->getCollection() === 'builds': + $queueForUsage->addMetric("{$project->getId()}.{$document['functionId']}", "builds", $value); // per function + $queueForUsage->addMetric("{$project->getId()}.{$document['functionId']}", "builds.storage", $document->getAttribute('size') * $value); // per function + $queueForUsage->addMetric("{$project->getId()}", "builds", $value); // per project + $queueForUsage->addMetric("{$project->getId()}", "builds.storage", $document->getAttribute('size') * $value); // per project break; - case 'executions': - $usage->addMetric("{$project->getId()}.[FUNCTION_ID]", "executions", $value); // per function - $usage->addMetric("{$project->getId()}.[FUNCTION_ID]", "executions.compute", $document->getAttribute('duration') * $value); // per function - $usage->addMetric("{$project->getId()}", "executions", $value); // per project - $usage->addMetric("{$project->getId()}", "executions.compute", $document->getAttribute('duration') * $value); // per project + case $document->getCollection() === 'executions': + $queueForUsage->addMetric("{$project->getId()}.{$document['functionId']}", "executions", $value); // per function + $queueForUsage->addMetric("{$project->getId()}.{$document['functionId']}", "executions.compute", $document->getAttribute('duration') * $value); // per function + $queueForUsage->addMetric("{$project->getId()}", "executions", $value); // per project + $queueForUsage->addMetric("{$project->getId()}", "executions.compute", $document->getAttribute('duration') * $value); // per project break; default: // if (strpos($collection, 'bucket_') === 0) { @@ -141,8 +141,9 @@ App::init() ->inject('deletes') ->inject('database') ->inject('dbForProject') + ->inject('queueForUsage') ->inject('mode') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $events, Audit $audits, Mail $mails, Delete $deletes, EventDatabase $database, Database $dbForProject, string $mode) use ($databaseListener) { + ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $events, Audit $audits, Mail $mails, Delete $deletes, EventDatabase $database, Database $dbForProject, Usage $queueForUsage, string $mode) use ($databaseListener) { $route = $utopia->match($request); @@ -240,8 +241,8 @@ App::init() $database->setProject($project); $dbForProject - ->on(Database::EVENT_DOCUMENT_CREATE, fn ($event, Document $document) => $databaseListener($event, $document)) - ->on(Database::EVENT_DOCUMENT_DELETE, fn ($event, Document $document) => $databaseListener($event, $document)) + ->on(Database::EVENT_DOCUMENT_CREATE, fn ($event, Document $document) => $databaseListener($event, $document, $project, $queueForUsage)) + ->on(Database::EVENT_DOCUMENT_DELETE, fn ($event, Document $document) => $databaseListener($event, $document, $project, $queueForUsage)) ; $useCache = $route->getLabel('cache', false); @@ -315,7 +316,8 @@ App::shutdown() ->inject('database') ->inject('dbForProject') ->inject('queueForFunctions') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Event $events, Audit $audits, Delete $deletes, EventDatabase $database, Database $dbForProject, Func $queueForFunctions) use ($parseLabel) { + ->inject('queueForUsage') + ->action(function (App $utopia, Request $request, Response $response, Document $project, Event $events, Audit $audits, Delete $deletes, EventDatabase $database, Database $dbForProject, Func $queueForFunctions, Usage $queueForUsage) use ($parseLabel) { $responsePayload = $response->getPayload(); @@ -472,18 +474,17 @@ App::shutdown() } } - if ( - App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled' - && $project->getId() - && !empty($route->getLabel('sdk.namespace', null)) - ) { // Don't calculate console usage on admin mode - + if ($project->getId() && !empty($route->getLabel('sdk.namespace', null))) { $fileSize = 0; $file = $request->getFiles('file'); if (!empty($file)) { $fileSize = (\is_array($file['size']) && isset($file['size'][0])) ? $file['size'][0] : $file['size']; } + $queueForUsage->addMetric("{$project->getId()}", "network.inbound", $request->getSize() + $fileSize); + $queueForUsage->addMetric("{$project->getId()}", "network.outbound", $response->getSize()); + $queueForUsage->trigger(); + // $usage // ->setParam('project.{scope}.network.inbound', $request->getSize() + $fileSize) // ->setParam('project.{scope}.network.outbound', $response->getSize()) diff --git a/app/init.php b/app/init.php index 501f0a06a..85065ceb2 100644 --- a/app/init.php +++ b/app/init.php @@ -18,6 +18,7 @@ ini_set('display_startup_errors', 1); ini_set('default_socket_timeout', -1); error_reporting(E_ALL); +use Appwrite\Event\Usage; use Appwrite\Extend\Exception; use Appwrite\Auth\Auth; use Appwrite\SMS\Adapter\Mock; @@ -835,6 +836,9 @@ App::setResource('queue', function (Group $pools) { App::setResource('queueForFunctions', function (Connection $queue) { return new Func($queue); }, ['queue']); +App::setResource('queueForUsage', function (Connection $queue) { + return new Usage($queue); +}, ['queue']); App::setResource('clients', function ($request, $console, $project) { $console->setAttribute('platforms', [ // Always allow current host '$collection' => ID::custom('platforms'), diff --git a/app/worker.php b/app/worker.php index 8151381d4..93df36dd5 100644 --- a/app/worker.php +++ b/app/worker.php @@ -100,7 +100,7 @@ Server::setResource('pools', function ($register) { $pools = $register->get('pools'); $connection = $pools->get('queue')->pop()->getResource(); $workerNumber = swoole_cpu_num() * intval(App::getEnv('_APP_WORKER_PER_CORE', 6)); - +$workerNumber = 1; if (empty(App::getEnv('QUEUE'))) { throw new Exception('Please configure "QUEUE" environemnt variable.'); } diff --git a/app/workers/usage.php b/app/workers/usage.php new file mode 100644 index 000000000..d10005dea --- /dev/null +++ b/app/workers/usage.php @@ -0,0 +1,34 @@ +job() + ->inject('message') + ->action(function (Message $message) use (&$stack) { + $payload = $message->getPayload() ?? []; + foreach ($payload['metrics'] ?? [] as $metric) { + if (!isset($stack[$metric['namespace']][$metric['key']])) { + $stack[$metric['namespace']][$metric['key']] = $metric['value']; + continue; + } + $stack[$metric['namespace']][$metric['key']] += $metric['value']; + } + }); + +$server + ->workerStart() + ->action(function () use (&$stack) { + Timer::tick(30000, function () use (&$stack) { + $chunk = array_slice($stack, 0, count($stack)); + array_splice($stack, 0, count($stack)); + var_dump($chunk); + + }); + }); + +$server->start(); diff --git a/bin/worker-usage b/bin/worker-usage new file mode 100644 index 000000000..9d325ac46 --- /dev/null +++ b/bin/worker-usage @@ -0,0 +1,3 @@ +#!/bin/sh + +QUEUE=v1-usage php /usr/src/code/app/workers/usage.php $@ \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 6c040df4c..721c943af 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -93,6 +93,7 @@ services: - ./public:/usr/src/code/public - ./src:/usr/src/code/src - ./dev:/usr/local/dev + - ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database depends_on: - mariadb @@ -550,6 +551,43 @@ services: - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG + appwrite-worker-usage: + entrypoint: worker-usage + <<: *x-logging + container_name: appwrite-worker-usage + image: appwrite-dev + networks: + - appwrite + volumes: + - ./app:/usr/src/code/app + - ./src:/usr/src/code/src + - ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database + depends_on: + - redis + - mariadb + environment: + - _APP_ENV + - _APP_WORKER_PER_CORE + - _APP_CONNECTIONS_MAX + - _APP_POOL_CLIENTS + - _APP_OPENSSL_KEY_V1 + - _APP_DB_HOST + - _APP_DB_PORT + - _APP_DB_SCHEMA + - _APP_DB_USER + - _APP_DB_PASS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS + - _APP_CONNECTIONS_DB_CONSOLE + - _APP_CONNECTIONS_DB_PROJECT + - _APP_CONNECTIONS_CACHE + - _APP_CONNECTIONS_QUEUE + - _APP_USAGE_STATS + - DOCKERHUB_PULL_USERNAME + - DOCKERHUB_PULL_PASSWORD + appwrite-maintenance: entrypoint: maintenance <<: *x-logging diff --git a/src/Appwrite/Event/Event.php b/src/Appwrite/Event/Event.php index f88d2e94a..0fecbe030 100644 --- a/src/Appwrite/Event/Event.php +++ b/src/Appwrite/Event/Event.php @@ -23,6 +23,9 @@ class Event public const FUNCTIONS_QUEUE_NAME = 'v1-functions'; public const FUNCTIONS_CLASS_NAME = 'FunctionsV1'; + public const USAGE_QUEUE_NAME = 'v1-usage'; + public const USAGE_CLASS_NAME = 'UsageV1'; + public const WEBHOOK_QUEUE_NAME = 'v1-webhooks'; public const WEBHOOK_CLASS_NAME = 'WebhooksV1'; diff --git a/src/Appwrite/Event/Usage.php b/src/Appwrite/Event/Usage.php index 813d8ec5c..ab5cae15d 100644 --- a/src/Appwrite/Event/Usage.php +++ b/src/Appwrite/Event/Usage.php @@ -11,11 +11,11 @@ class Usage extends Event public function __construct(protected Connection $connection) { - parent::__construct(Event::FUNCTIONS_QUEUE_NAME, Event::FUNCTIONS_CLASS_NAME); + parent::__construct(Event::USAGE_QUEUE_NAME, Event::USAGE_CLASS_NAME); } /** - * Sets function document for the function event. + * Add metric. * * @param string $namespace * @param string $key @@ -34,19 +34,15 @@ class Usage extends Event } /** - * Executes the function event and sends it to the functions worker. + * Sends metrics to the usage worker. * - * @return bool + * @return string|bool */ public function trigger(): string|bool { $client = new Client($this->queue, $this->connection); return $client->enqueue([ - 'project' => $this->project, - 'user' => $this->user, - 'type' => $this->type, - 'payload' => $this->payload, 'metrics' => $this->metrics, ]); } From 9c19544c61de01fa219a7a9576c58595b7c54934 Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 5 Dec 2022 12:43:31 +0200 Subject: [PATCH 04/94] updates --- app/workers/usage.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/workers/usage.php b/app/workers/usage.php index d10005dea..fda09de1b 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -24,6 +24,9 @@ $server ->workerStart() ->action(function () use (&$stack) { Timer::tick(30000, function () use (&$stack) { + $hourly = date('d-m-Y H:00', time()); + $daily = date('d-m-Y 00:00', time()); + $chunk = array_slice($stack, 0, count($stack)); array_splice($stack, 0, count($stack)); var_dump($chunk); From f44ee4ec906833fc065e8519a3f2bdfe3be43ca9 Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 6 Dec 2022 13:36:17 +0200 Subject: [PATCH 05/94] updates --- app/controllers/shared/api.php | 15 +++-- app/workers/usage.php | 104 ++++++++++++++++++++++++++++----- src/Appwrite/Event/Usage.php | 1 + 3 files changed, 101 insertions(+), 19 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 0d16a4641..34eeca9d8 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -68,7 +68,7 @@ $databaseListener = function (string $event, Document $document, Document $proje case $document->getCollection() === 'databases': $queueForUsage->addMetric("{$project->getId()}", "databases", $value); // per project break; - case str_starts_with($document->getCollection(), 'database'): // collections + case str_starts_with($document->getCollection(), 'database_'): // collections $queueForUsage->addMetric("{$project->getId()}.{$document['databaseId']}", "collections", $value); // per database $queueForUsage->addMetric("{$project->getId()}", "collections", $value); // per project break; @@ -80,7 +80,7 @@ $databaseListener = function (string $event, Document $document, Document $proje case $document->getCollection() === 'buckets': $queueForUsage->addMetric("{$project->getId()}", "buckets", $value); // per project break; - case $document->getCollection() === 'files': + case str_starts_with($document->getCollection(), 'bucket_'): // files $queueForUsage->addMetric("{$project->getId()}.{$document['bucketId']}", "files", $value); // per bucket $queueForUsage->addMetric("{$project->getId()}.{$document['bucketId']}", "files.storage", $document->getAttribute('sizeOriginal') * $value); // per bucket $queueForUsage->addMetric("{$project->getId()}", "files", $value); // per project @@ -474,16 +474,19 @@ App::shutdown() } } - if ($project->getId() && !empty($route->getLabel('sdk.namespace', null))) { + if ($project->getId() && $project->getId() !== 'console') { $fileSize = 0; $file = $request->getFiles('file'); + if (!empty($file)) { $fileSize = (\is_array($file['size']) && isset($file['size'][0])) ? $file['size'][0] : $file['size']; } - $queueForUsage->addMetric("{$project->getId()}", "network.inbound", $request->getSize() + $fileSize); - $queueForUsage->addMetric("{$project->getId()}", "network.outbound", $response->getSize()); - $queueForUsage->trigger(); + $queueForUsage + ->setProject($project) + ->addMetric("{$project->getId()}", "network.inbound", $request->getSize() + $fileSize) + ->addMetric("{$project->getId()}", "network.outbound", $response->getSize()) + ->trigger(); // $usage // ->setParam('project.{scope}.network.inbound', $request->getSize() + $fileSize) diff --git a/app/workers/usage.php b/app/workers/usage.php index fda09de1b..1c1e4d2dc 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -2,36 +2,114 @@ require_once __DIR__ . '/../worker.php'; +use Swoole\Table; use Swoole\Timer; +use Utopia\Database\Database; +use Utopia\Database\Document; +use Utopia\Database\Validator\Authorization; use Utopia\Queue\Message; +use Utopia\CLI\Console; -$stack = []; +$stats = []; + +$periods['1h'] = 'Y-m-d H:00'; +$periods['1d'] = 'Y-m-d 00:00'; +$periods['inf'] = 'Y-m-d 00:00'; + +//$stats = new Table(10000, 1); +//$stats->column('namespace', Table::TYPE_STRING, 64); +//$stats->column('key', Table::TYPE_STRING, 64); +//$stats->column('value', Table::TYPE_INT); +//$stats->create(); $server->job() ->inject('message') - ->action(function (Message $message) use (&$stack) { + ->action(function (Message $message) use (&$stats) { $payload = $message->getPayload() ?? []; + $project = new Document($payload['project'] ?? []); + foreach ($payload['metrics'] ?? [] as $metric) { - if (!isset($stack[$metric['namespace']][$metric['key']])) { - $stack[$metric['namespace']][$metric['key']] = $metric['value']; + $uniq = md5($metric['namespace'] . $metric['key']); + +// if ($stats->exists($uniq)) { +// $stats->incr($uniq, 'value', $metric['value']); +// continue; +// } +// +// $stats->set($uniq, [ +// 'projectInternalId' => $project->getInternalId(), +// 'database' => $project->getAttribute('database'), +// 'key' => $metric['key'], +// 'value' => $metric['value'], +// ]); +// + + if (!isset($stats[$uniq])) { + $stats[$uniq] = [ + 'projectInternalId' => $project->getInternalId(), + 'database' => $project->getAttribute('database'), + 'key' => $metric['namespace'] . '.' . $metric['key'], + 'value' => $metric['value'] + ]; + continue; } - $stack[$metric['namespace']][$metric['key']] += $metric['value']; + + $stats[$uniq]['value'] += $metric['value']; } }); $server ->workerStart() - ->action(function () use (&$stack) { - Timer::tick(30000, function () use (&$stack) { - $hourly = date('d-m-Y H:00', time()); - $daily = date('d-m-Y 00:00', time()); + ->inject('register') + ->inject('cache') + ->inject('pools') + ->action(function ($register, $cache, $pools) use ($periods, &$stats) { + Timer::tick(30000, function () use ($register, $cache, $pools, $periods, &$stats) { - $chunk = array_slice($stack, 0, count($stack)); - array_splice($stack, 0, count($stack)); - var_dump($chunk); + $slice = array_slice($stats, 0, count($stats)); + array_splice($stats, 0, count($stats)); - }); + foreach ($slice as $metric) { + foreach ($periods as $period => $format) { + $time = date($format, time()); + $id = \md5("{$time}_{$period}_{$metric['key']}"); + + $adapter = new Database( + $pools + ->get($metric['database']) + ->pop() + ->getResource(), + $cache + ); + + $adapter->setNamespace('_' . $metric['projectInternalId']); + + try { + $document = Authorization::skip(fn() =>$adapter->getDocument('stats', $id)); + if ($document->isEmpty()) { + console::log("{$period}, {$time}, {$metric['key']}={$metric['value']}"); + Authorization::skip(fn() => $adapter->createDocument('stats', new Document([ + '$id' => $id, + 'period' => $period, + 'time' => $time, + 'metric' => $metric['key'], + 'value' => $metric['value'], + 'type' => 0, + 'region' => 'default', + ]))); + } else { + $value = $document->getAttribute('value') + $metric['value']; + console::info("{$document->getAttribute('period')}, {$document->getAttribute('time')}, {$document->getAttribute('metric')} = {$value}"); + Authorization::skip(fn() => $adapter->updateDocument('stats', $document->getId(), $document->setAttribute('value', $value))); + } + } catch (\Exception $e) { + console::error($e->getMessage()); + } + $pools->reclaim(); + } + } + }); }); $server->start(); diff --git a/src/Appwrite/Event/Usage.php b/src/Appwrite/Event/Usage.php index ab5cae15d..1da63383d 100644 --- a/src/Appwrite/Event/Usage.php +++ b/src/Appwrite/Event/Usage.php @@ -43,6 +43,7 @@ class Usage extends Event $client = new Client($this->queue, $this->connection); return $client->enqueue([ + 'project' => $this->getProject(), 'metrics' => $this->metrics, ]); } From e1368231b2fb07f25f495f7cf3698ccb3454d9d2 Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 6 Dec 2022 16:17:56 +0200 Subject: [PATCH 06/94] updates --- app/controllers/shared/api.php | 5 +++-- app/workers/usage.php | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 34eeca9d8..979a0cbb8 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -55,6 +55,7 @@ $databaseListener = function (string $event, Document $document, Document $proje $value = -1; } var_dump($document->getCollection()); + switch (true) { case $document->getCollection() === 'users': $queueForUsage->addMetric("{$project->getId()}", "users", $value); // per project @@ -90,8 +91,8 @@ $databaseListener = function (string $event, Document $document, Document $proje $queueForUsage->addMetric("{$project->getId()}", "functions", $value); // per project break; case $document->getCollection() === 'deployments': - $queueForUsage->addMetric("{$project->getId()}.{$document['functionId']}", "deployments", $value); // per function - $queueForUsage->addMetric("{$project->getId()}.{$document['functionId']}", "deployments.storage", $document->getAttribute('size') * $value); // per function + $queueForUsage->addMetric("{$project->getId()}.{$document['resourceId']}", "deployments", $value); // per function + $queueForUsage->addMetric("{$project->getId()}.{$document['resourceId']}", "deployments.storage", $document->getAttribute('size') * $value); // per function $queueForUsage->addMetric("{$project->getId()}", "deployments", $value); // per project $queueForUsage->addMetric("{$project->getId()}", "deployments.storage", $document->getAttribute('size') * $value); // per project break; diff --git a/app/workers/usage.php b/app/workers/usage.php index 1c1e4d2dc..b86dcd6f9 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -4,6 +4,7 @@ require_once __DIR__ . '/../worker.php'; use Swoole\Table; use Swoole\Timer; +use Utopia\App; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; @@ -96,7 +97,7 @@ $server 'metric' => $metric['key'], 'value' => $metric['value'], 'type' => 0, - 'region' => 'default', + 'region' => App::getEnv('_APP_REGION', 'default'), ]))); } else { $value = $document->getAttribute('value') + $metric['value']; From c9b6b3bf8b965891957f82d485bfdb6659bef7bf Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 7 Dec 2022 12:48:18 +0200 Subject: [PATCH 07/94] storage api usage --- app/controllers/api/storage.php | 314 +++++++++++++++----------------- 1 file changed, 142 insertions(+), 172 deletions(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 45bb8148a..1795c470c 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -1426,101 +1426,80 @@ App::get('/v1/storage/usage') ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), 'Date range.', true) ->inject('response') ->inject('dbForProject') - ->action(function (string $range, Response $response, Database $dbForProject) { + ->inject('project') + ->action(function (string $range, Response $response, Database $dbForProject, Document $project) { - // $usage = []; - // if (App::getEnv('_APP_USAGE_STATS', 'enabled') === 'enabled') { - // $periods = [ - // '24h' => [ - // 'period' => '1h', - // 'limit' => 24, - // ], - // '7d' => [ - // 'period' => '1d', - // 'limit' => 7, - // ], - // '30d' => [ - // 'period' => '1d', - // 'limit' => 30, - // ], - // '90d' => [ - // 'period' => '1d', - // 'limit' => 90, - // ], - // ]; + $periods = [ + '24h' => [ + 'period' => '1h', + 'limit' => 24, + 'factor' => 3600, + ], + '7d' => [ + 'period' => '1d', + 'limit' => 7, + 'factor' => 86400, + ], + '30d' => [ + 'period' => '1d', + 'limit' => 30, + 'factor' => 86400, + ], + '90d' => [ + 'period' => '1d', + 'limit' => 90, + 'factor' => 86400, + ], + ]; - // $metrics = [ - // 'project.$all.storage.size', - // 'buckets.$all.count.total', - // 'buckets.$all.requests.create', - // 'buckets.$all.requests.read', - // 'buckets.$all.requests.update', - // 'buckets.$all.requests.delete', - // 'files.$all.storage.size', - // 'files.$all.count.total', - // 'files.$all.requests.create', - // 'files.$all.requests.read', - // 'files.$all.requests.update', - // 'files.$all.requests.delete', - // ]; + $stats = $usage = []; + $days = $periods[$range]; + $metrics = [ + $project->getId() . '.buckets', + ]; - // $stats = []; + Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $days['limit']; + $period = $days['period']; + $results = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + $stats[$metric] = []; + foreach ($results as $result) { + $stats[$metric][$result->getAttribute('time')] = [ + 'value' => $result->getAttribute('value'), + ]; + } + } + }); - // Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - // foreach ($metrics as $metric) { - // $limit = $periods[$range]['limit']; - // $period = $periods[$range]['period']; + $format = match ($days['period']) { + '1h' => 'Y-m-d\TH:00:00.000P', + '1d' => 'Y-m-d\T00:00:00.000P', + }; - // $requestDocs = $dbForProject->find('stats', [ - // Query::equal('period', [$period]), - // Query::equal('metric', [$metric]), - // Query::limit($limit), - // Query::orderDesc('time'), - // ]); - - // $stats[$metric] = []; - // foreach ($requestDocs as $requestDoc) { - // $stats[$metric][] = [ - // 'value' => $requestDoc->getAttribute('value'), - // 'date' => $requestDoc->getAttribute('time'), - // ]; - // } - - // // backfill metrics with empty values for graphs - // $backfill = $limit - \count($requestDocs); - // while ($backfill > 0) { - // $last = $limit - $backfill - 1; // array index of last added metric - // $diff = match ($period) { // convert period to seconds for unix timestamp math - // '1h' => 3600, - // '1d' => 86400, - // }; - // $stats[$metric][] = [ - // 'value' => 0, - // 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), - // ]; - // $backfill--; - // } - // $stats[$metric] = array_reverse($stats[$metric]); - // } - // }); - - // $usage = new Document([ - // 'range' => $range, - // 'bucketsCount' => $stats['buckets.$all.count.total'], - // 'bucketsCreate' => $stats['buckets.$all.requests.create'], - // 'bucketsRead' => $stats['buckets.$all.requests.read'], - // 'bucketsUpdate' => $stats['buckets.$all.requests.update'], - // 'bucketsDelete' => $stats['buckets.$all.requests.delete'], - // 'storage' => $stats['project.$all.storage.size'], - // 'filesCount' => $stats['files.$all.count.total'], - // 'filesCreate' => $stats['files.$all.requests.create'], - // 'filesRead' => $stats['files.$all.requests.read'], - // 'filesUpdate' => $stats['files.$all.requests.update'], - // 'filesDelete' => $stats['files.$all.requests.delete'], - // ]); - // } - - // $response->dynamic($usage, Response::MODEL_USAGE_STORAGE); + foreach ($metrics as $metric) { + $usage[$metric] = []; + $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { + $leap += $days['factor']; + $formatDate = date($format, $leap); + $usage[$metric][] = [ + 'value' => $stats[$metric][$formatDate] ?? 0, + 'date' => $formatDate, + ]; + } + $usage[$metric] = array_reverse($usage[$metric]); + } + var_dump($usage); + $response->noContent(); +// $response->dynamic(new Document([ +// $usage +// ]), Response::MODEL_USAGE_STORAGE); }); App::get('/v1/storage/:bucketId/usage') @@ -1537,94 +1516,85 @@ App::get('/v1/storage/:bucketId/usage') ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), 'Date range.', true) ->inject('response') ->inject('dbForProject') - ->action(function (string $bucketId, string $range, Response $response, Database $dbForProject) { + ->inject('project') + ->action(function (string $bucketId, string $range, Response $response, Database $dbForProject, Document $project) { - // $bucket = $dbForProject->getDocument('buckets', $bucketId); + $bucket = $dbForProject->getDocument('buckets', $bucketId); - // if ($bucket->isEmpty()) { - // throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); - // } + if ($bucket->isEmpty()) { + throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); + } - // $usage = []; - // if (App::getEnv('_APP_USAGE_STATS', 'enabled') === 'enabled') { - // $periods = [ - // '24h' => [ - // 'period' => '1h', - // 'limit' => 24, - // ], - // '7d' => [ - // 'period' => '1d', - // 'limit' => 7, - // ], - // '30d' => [ - // 'period' => '1d', - // 'limit' => 30, - // ], - // '90d' => [ - // 'period' => '1d', - // 'limit' => 90, - // ], - // ]; + $periods = [ + '24h' => [ + 'period' => '1h', + 'limit' => 24, + 'factor' => 3600, + ], + '7d' => [ + 'period' => '1d', + 'limit' => 7, + 'factor' => 86400, + ], + '30d' => [ + 'period' => '1d', + 'limit' => 30, + 'factor' => 86400, + ], + '90d' => [ + 'period' => '1d', + 'limit' => 90, + 'factor' => 86400, + ], + ]; - // $metrics = [ - // "files.{$bucketId}.count.total", - // "files.{$bucketId}.storage.size", - // "files.{$bucketId}.requests.create", - // "files.{$bucketId}.requests.read", - // "files.{$bucketId}.requests.update", - // "files.{$bucketId}.requests.delete", - // ]; + $stats = $usage = []; + $days = $periods[$range]; + $metrics = [ + $project->getId() . '.' . $bucket->getId() . '.files', + $project->getId() . '.' . $bucket->getId() . '.files.storage', + ]; - // $stats = []; + Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $days['limit']; + $period = $days['period']; + $results = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + $stats[$metric] = []; + foreach ($results as $result) { + $stats[$metric][$result->getAttribute('time')] = [ + 'value' => $result->getAttribute('value'), + ]; + } + } + }); - // Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - // foreach ($metrics as $metric) { - // $limit = $periods[$range]['limit']; - // $period = $periods[$range]['period']; + $format = match ($days['period']) { + '1h' => 'Y-m-d\TH:00:00.000P', + '1d' => 'Y-m-d\T00:00:00.000P', + }; - // $requestDocs = $dbForProject->find('stats', [ - // Query::equal('period', [$period]), - // Query::equal('metric', [$metric]), - // Query::limit($limit), - // Query::orderDesc('time'), - // ]); + foreach ($metrics as $metric) { + $usage[$metric] = []; + $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { + $leap += $days['factor']; + $formatDate = date($format, $leap); + $usage[$metric][] = [ + 'value' => $stats[$metric][$formatDate] ?? 0, + 'date' => $formatDate, + ]; + } + $usage[$metric] = array_reverse($usage[$metric]); + } - // $stats[$metric] = []; - // foreach ($requestDocs as $requestDoc) { - // $stats[$metric][] = [ - // 'value' => $requestDoc->getAttribute('value'), - // 'date' => $requestDoc->getAttribute('time'), - // ]; - // } - - // // backfill metrics with empty values for graphs - // $backfill = $limit - \count($requestDocs); - // while ($backfill > 0) { - // $last = $limit - $backfill - 1; // array index of last added metric - // $diff = match ($period) { // convert period to seconds for unix timestamp math - // '1h' => 3600, - // '1d' => 86400, - // }; - // $stats[$metric][] = [ - // 'value' => 0, - // 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), - // ]; - // $backfill--; - // } - // $stats[$metric] = array_reverse($stats[$metric]); - // } - // }); - - // $usage = new Document([ - // 'range' => $range, - // 'filesCount' => $stats[$metrics[0]], - // 'filesStorage' => $stats[$metrics[1]], - // 'filesCreate' => $stats[$metrics[2]], - // 'filesRead' => $stats[$metrics[3]], - // 'filesUpdate' => $stats[$metrics[4]], - // 'filesDelete' => $stats[$metrics[5]], - // ]); - // } - - // $response->dynamic($usage, Response::MODEL_USAGE_BUCKETS); + var_dump($usage); + $response->dynamic(new Document([ + $usage + ]), Response::MODEL_USAGE_BUCKETS); }); From 5d63d2f19948fae6f7f1f63c92093b69f743a009 Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 7 Dec 2022 19:01:25 +0200 Subject: [PATCH 08/94] functions api usage --- app/config/usage.php | 24 ++ app/controllers/api/functions.php | 376 ++++++++---------- app/controllers/api/storage.php | 71 +--- app/controllers/shared/api.php | 27 +- app/init.php | 1 + .../Utopia/Response/Model/UsageBuckets.php | 28 -- .../Utopia/Response/Model/UsageFunctions.php | 34 +- .../Utopia/Response/Model/UsageStorage.php | 64 +-- 8 files changed, 225 insertions(+), 400 deletions(-) create mode 100644 app/config/usage.php diff --git a/app/config/usage.php b/app/config/usage.php new file mode 100644 index 000000000..2179bcce5 --- /dev/null +++ b/app/config/usage.php @@ -0,0 +1,24 @@ + [ + 'period' => '1h', + 'limit' => 24, + 'factor' => 3600, + ], + '7d' => [ + 'period' => '1d', + 'limit' => 7, + 'factor' => 86400, + ], + '30d' => [ + 'period' => '1d', + 'limit' => 30, + 'factor' => 86400, + ], + '90d' => [ + 'period' => '1d', + 'limit' => 90, + 'factor' => 86400, + ], +]; diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 42bc61408..87b5425bc 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -207,219 +207,6 @@ App::get('/v1/functions/:functionId') $response->dynamic($function, Response::MODEL_FUNCTION); }); -App::get('/v1/functions/:functionId/usage') - ->desc('Get Function Usage') - ->groups(['api', 'functions']) - ->label('scope', 'functions.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'getFunctionUsage') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USAGE_FUNCTIONS) - ->param('functionId', '', new UID(), 'Function ID.') - ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d']), 'Date range.', true) - ->inject('response') - ->inject('dbForProject') - ->action(function (string $functionId, string $range, Response $response, Database $dbForProject) { - - // $function = $dbForProject->getDocument('functions', $functionId); - - // if ($function->isEmpty()) { - // throw new Exception(Exception::FUNCTION_NOT_FOUND); - // } - - // $usage = []; - // if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { - // $periods = [ - // '24h' => [ - // 'period' => '1h', - // 'limit' => 24, - // ], - // '7d' => [ - // 'period' => '1d', - // 'limit' => 7, - // ], - // '30d' => [ - // 'period' => '1d', - // 'limit' => 30, - // ], - // '90d' => [ - // 'period' => '1d', - // 'limit' => 90, - // ], - // ]; - - // $metrics = [ - // "executions.$functionId.compute.total", - // "executions.$functionId.compute.success", - // "executions.$functionId.compute.failure", - // "executions.$functionId.compute.time", - // "builds.$functionId.compute.total", - // "builds.$functionId.compute.success", - // "builds.$functionId.compute.failure", - // "builds.$functionId.compute.time", - // ]; - - // $stats = []; - - // Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - // foreach ($metrics as $metric) { - // $limit = $periods[$range]['limit']; - // $period = $periods[$range]['period']; - - // $requestDocs = $dbForProject->find('stats', [ - // Query::equal('period', [$period]), - // Query::equal('metric', [$metric]), - // Query::limit($limit), - // Query::orderDesc('time'), - // ]); - - // $stats[$metric] = []; - // foreach ($requestDocs as $requestDoc) { - // $stats[$metric][] = [ - // 'value' => $requestDoc->getAttribute('value'), - // 'date' => $requestDoc->getAttribute('time'), - // ]; - // } - - // // backfill metrics with empty values for graphs - // $backfill = $limit - \count($requestDocs); - // while ($backfill > 0) { - // $last = $limit - $backfill - 1; // array index of last added metric - // $diff = match ($period) { // convert period to seconds for unix timestamp math - // '1h' => 3600, - // '1d' => 86400, - // }; - // $stats[$metric][] = [ - // 'value' => 0, - // 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), - // ]; - // $backfill--; - // } - // $stats[$metric] = array_reverse($stats[$metric]); - // } - // }); - - // $usage = new Document([ - // 'range' => $range, - // 'executionsTotal' => $stats["executions.$functionId.compute.total"] ?? [], - // 'executionsFailure' => $stats["executions.$functionId.compute.failure"] ?? [], - // 'executionsSuccesse' => $stats["executions.$functionId.compute.success"] ?? [], - // 'executionsTime' => $stats["executions.$functionId.compute.time"] ?? [], - // 'buildsTotal' => $stats["builds.$functionId.compute.total"] ?? [], - // 'buildsFailure' => $stats["builds.$functionId.compute.failure"] ?? [], - // 'buildsSuccess' => $stats["builds.$functionId.compute.success"] ?? [], - // 'buildsTime' => $stats["builds.$functionId.compute.time" ?? []] - // ]); - // } - - // $response->dynamic($usage, Response::MODEL_USAGE_FUNCTION); - }); - -App::get('/v1/functions/usage') - ->desc('Get Functions Usage') - ->groups(['api', 'functions']) - ->label('scope', 'functions.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'getUsage') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USAGE_FUNCTIONS) - ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d']), 'Date range.', true) - ->inject('response') - ->inject('dbForProject') - ->action(function (string $range, Response $response, Database $dbForProject) { - - // $usage = []; - // if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { - // $periods = [ - // '24h' => [ - // 'period' => '1h', - // 'limit' => 24, - // ], - // '7d' => [ - // 'period' => '1d', - // 'limit' => 7, - // ], - // '30d' => [ - // 'period' => '1d', - // 'limit' => 30, - // ], - // '90d' => [ - // 'period' => '1d', - // 'limit' => 90, - // ], - // ]; - - // $metrics = [ - // 'executions.$all.compute.total', - // 'executions.$all.compute.failure', - // 'executions.$all.compute.success', - // 'executions.$all.compute.time', - // 'builds.$all.compute.total', - // 'builds.$all.compute.failure', - // 'builds.$all.compute.success', - // 'builds.$all.compute.time', - // ]; - - // $stats = []; - - // Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - // foreach ($metrics as $metric) { - // $limit = $periods[$range]['limit']; - // $period = $periods[$range]['period']; - - // $requestDocs = $dbForProject->find('stats', [ - // Query::equal('period', [$period]), - // Query::equal('metric', [$metric]), - // Query::limit($limit), - // Query::orderDesc('time'), - // ]); - - // $stats[$metric] = []; - // foreach ($requestDocs as $requestDoc) { - // $stats[$metric][] = [ - // 'value' => $requestDoc->getAttribute('value'), - // 'date' => $requestDoc->getAttribute('time'), - // ]; - // } - - // // backfill metrics with empty values for graphs - // $backfill = $limit - \count($requestDocs); - // while ($backfill > 0) { - // $last = $limit - $backfill - 1; // array index of last added metric - // $diff = match ($period) { // convert period to seconds for unix timestamp math - // '1h' => 3600, - // '1d' => 86400, - // }; - // $stats[$metric][] = [ - // 'value' => 0, - // 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), - // ]; - // $backfill--; - // } - // $stats[$metric] = array_reverse($stats[$metric]); - // } - // }); - - // $usage = new Document([ - // 'range' => $range, - // 'executionsTotal' => $stats[$metrics[0]] ?? [], - // 'executionsFailure' => $stats[$metrics[1]] ?? [], - // 'executionsSuccess' => $stats[$metrics[2]] ?? [], - // 'executionsTime' => $stats[$metrics[3]] ?? [], - // 'buildsTotal' => $stats[$metrics[4]] ?? [], - // 'buildsFailure' => $stats[$metrics[5]] ?? [], - // 'buildsSuccess' => $stats[$metrics[6]] ?? [], - // 'buildsTime' => $stats[$metrics[7]] ?? [], - // ]); - // } - - // $response->dynamic($usage, Response::MODEL_USAGE_FUNCTIONS); - }); - App::put('/v1/functions/:functionId') ->groups(['api', 'functions']) ->desc('Update Function') @@ -1559,3 +1346,166 @@ App::delete('/v1/functions/:functionId/variables/:variableId') $response->noContent(); }); + +App::get('/v1/functions/:functionId/usage') + ->desc('Get Function Usage') + ->groups(['api', 'functions']) + ->label('scope', 'functions.read') + ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) + ->label('sdk.namespace', 'functions') + ->label('sdk.method', 'getFunctionUsage') + ->label('sdk.response.code', Response::STATUS_CODE_OK) + ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) + ->label('sdk.response.model', Response::MODEL_USAGE_FUNCTIONS) + ->param('functionId', '', new UID(), 'Function ID.') + ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d']), 'Date range.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('project') + ->action(function (string $functionId, string $range, Response $response, Database $dbForProject, Document $project) { + + $function = $dbForProject->getDocument('functions', $functionId); + + if ($function->isEmpty()) { + throw new Exception(Exception::FUNCTION_NOT_FOUND); + } + + $periods = Config::getParam('usage', []); + $stats = $usage = []; + $days = $periods[$range]; + $metrics = [ + $project->getId() . '.function.' . $function->getId() . '.deployments', + $project->getId() . '.function.' . $function->getId() . '.deployments.storage', + $project->getId() . '.' . $function->getId() . '.builds', + $project->getId() . '.' . $function->getId() . '.builds.storage', + $project->getId() . '.' . $function->getId() . '.executions', + $project->getId() . '.' . $function->getId() . '.executions.compute', + ]; + + Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $days['limit']; + $period = $days['period']; + $results = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + $stats[$metric] = []; + foreach ($results as $result) { + $stats[$metric][$result->getAttribute('time')] = [ + 'value' => $result->getAttribute('value'), + ]; + } + } + }); + + $format = match ($days['period']) { + '1h' => 'Y-m-d\TH:00:00.000P', + '1d' => 'Y-m-d\T00:00:00.000P', + }; + + foreach ($metrics as $metric) { + $usage[$metric] = []; + $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { + $leap += $days['factor']; + $formatDate = date($format, $leap); + $usage[$metric][] = [ + 'value' => $stats[$metric][$formatDate]['value'] ?? 0, + 'date' => $formatDate, + ]; + } + $usage[$metric] = array_reverse($usage[$metric]); + } + + $response->dynamic(new Document([ + 'range' => $range, + 'deployments' => $usage[$metrics[0]], + 'deploymentsStorage' => $usage[$metrics[1]], + 'builds' => $usage[$metrics[2]], + 'buildsStorage' => $usage[$metrics[3]], + 'executions' => $usage[$metrics[4]], + 'executionsCompute' => $usage[$metrics[5]], + ]), Response::MODEL_USAGE_FUNCTION); + }); + +App::get('/v1/functions/usage') + ->desc('Get Functions Usage') + ->groups(['api', 'functions']) + ->label('scope', 'functions.read') + ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) + ->label('sdk.namespace', 'functions') + ->label('sdk.method', 'getUsage') + ->label('sdk.response.code', Response::STATUS_CODE_OK) + ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) + ->label('sdk.response.model', Response::MODEL_USAGE_FUNCTIONS) + ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d']), 'Date range.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('project') + ->action(function (string $range, Response $response, Database $dbForProject, Document $project) { + + $periods = Config::getParam('usage', []); + $stats = $usage = []; + $days = $periods[$range]; + $metrics = [ + $project->getId() . '.functions', + $project->getId() . '.deployments', + $project->getId() . '.deployments.storage', + $project->getId() . '.builds', + $project->getId() . '.builds.storage', + $project->getId() . '.executions', + $project->getId() . '.executions.compute', + ]; + + Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $days['limit']; + $period = $days['period']; + $results = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + $stats[$metric] = []; + foreach ($results as $result) { + $stats[$metric][$result->getAttribute('time')] = [ + 'value' => $result->getAttribute('value'), + ]; + } + } + }); + + $format = match ($days['period']) { + '1h' => 'Y-m-d\TH:00:00.000P', + '1d' => 'Y-m-d\T00:00:00.000P', + }; + + foreach ($metrics as $metric) { + $usage[$metric] = []; + $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { + $leap += $days['factor']; + $formatDate = date($format, $leap); + $usage[$metric][] = [ + 'value' => $stats[$metric][$formatDate]['value'] ?? 0, + 'date' => $formatDate, + ]; + } + $usage[$metric] = array_reverse($usage[$metric]); + } + + $response->dynamic(new Document([ + 'range' => $range, + 'functions' => $usage[$metrics[0]], + 'deployments' => $usage[$metrics[1]], + 'deploymentsStorage' => $usage[$metrics[2]], + 'builds' => $usage[$metrics[3]], + 'buildsStorage' => $usage[$metrics[4]], + 'executions' => $usage[$metrics[5]], + 'executionsCompute' => $usage[$metrics[6]], + ]), Response::MODEL_USAGE_FUNCTIONS); + }); diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 1795c470c..3a6ca2981 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -1429,33 +1429,13 @@ App::get('/v1/storage/usage') ->inject('project') ->action(function (string $range, Response $response, Database $dbForProject, Document $project) { - $periods = [ - '24h' => [ - 'period' => '1h', - 'limit' => 24, - 'factor' => 3600, - ], - '7d' => [ - 'period' => '1d', - 'limit' => 7, - 'factor' => 86400, - ], - '30d' => [ - 'period' => '1d', - 'limit' => 30, - 'factor' => 86400, - ], - '90d' => [ - 'period' => '1d', - 'limit' => 90, - 'factor' => 86400, - ], - ]; - + $periods = Config::getParam('usage', []); $stats = $usage = []; $days = $periods[$range]; $metrics = [ $project->getId() . '.buckets', + $project->getId() . '.files', + $project->getId() . '.files.storage', ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { @@ -1489,17 +1469,19 @@ App::get('/v1/storage/usage') $leap += $days['factor']; $formatDate = date($format, $leap); $usage[$metric][] = [ - 'value' => $stats[$metric][$formatDate] ?? 0, + 'value' => $stats[$metric][$formatDate]['value'] ?? 0, 'date' => $formatDate, ]; } $usage[$metric] = array_reverse($usage[$metric]); } - var_dump($usage); - $response->noContent(); -// $response->dynamic(new Document([ -// $usage -// ]), Response::MODEL_USAGE_STORAGE); + + $response->dynamic(new Document([ + 'range' => $range, + 'buckets' => $usage[$metrics[0]], + 'filesCount' => $usage[$metrics[1]], + 'filesStorage' => $usage[$metrics[2]], + ]), Response::MODEL_USAGE_STORAGE); }); App::get('/v1/storage/:bucketId/usage') @@ -1525,29 +1507,7 @@ App::get('/v1/storage/:bucketId/usage') throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); } - $periods = [ - '24h' => [ - 'period' => '1h', - 'limit' => 24, - 'factor' => 3600, - ], - '7d' => [ - 'period' => '1d', - 'limit' => 7, - 'factor' => 86400, - ], - '30d' => [ - 'period' => '1d', - 'limit' => 30, - 'factor' => 86400, - ], - '90d' => [ - 'period' => '1d', - 'limit' => 90, - 'factor' => 86400, - ], - ]; - + $periods = Config::getParam('usage', []); $stats = $usage = []; $days = $periods[$range]; $metrics = [ @@ -1586,15 +1546,16 @@ App::get('/v1/storage/:bucketId/usage') $leap += $days['factor']; $formatDate = date($format, $leap); $usage[$metric][] = [ - 'value' => $stats[$metric][$formatDate] ?? 0, + 'value' => $stats[$metric][$formatDate]['value'] ?? 0, 'date' => $formatDate, ]; } $usage[$metric] = array_reverse($usage[$metric]); } - var_dump($usage); $response->dynamic(new Document([ - $usage + 'range' => $range, + 'filesCount' => $usage[$metrics[0]], + 'filesStorage' => $usage[$metrics[1]], ]), Response::MODEL_USAGE_BUCKETS); }); diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 979a0cbb8..4e0abb7e9 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -91,12 +91,12 @@ $databaseListener = function (string $event, Document $document, Document $proje $queueForUsage->addMetric("{$project->getId()}", "functions", $value); // per project break; case $document->getCollection() === 'deployments': - $queueForUsage->addMetric("{$project->getId()}.{$document['resourceId']}", "deployments", $value); // per function - $queueForUsage->addMetric("{$project->getId()}.{$document['resourceId']}", "deployments.storage", $document->getAttribute('size') * $value); // per function + $queueForUsage->addMetric("{$project->getId()}.{$document['resourceType']}.{$document['resourceId']}", "deployments", $value); // per function + $queueForUsage->addMetric("{$project->getId()}.{$document['resourceType']}.{$document['resourceId']}", "deployments.storage", $document->getAttribute('size') * $value); // per function $queueForUsage->addMetric("{$project->getId()}", "deployments", $value); // per project $queueForUsage->addMetric("{$project->getId()}", "deployments.storage", $document->getAttribute('size') * $value); // per project break; - case $document->getCollection() === 'builds': + case $document->getCollection() === 'builds': // needs to extract functionId $queueForUsage->addMetric("{$project->getId()}.{$document['functionId']}", "builds", $value); // per function $queueForUsage->addMetric("{$project->getId()}.{$document['functionId']}", "builds.storage", $document->getAttribute('size') * $value); // per function $queueForUsage->addMetric("{$project->getId()}", "builds", $value); // per project @@ -109,22 +109,6 @@ $databaseListener = function (string $event, Document $document, Document $proje $queueForUsage->addMetric("{$project->getId()}", "executions.compute", $document->getAttribute('duration') * $value); // per project break; default: - // if (strpos($collection, 'bucket_') === 0) { - // $usage - // ->setParam('bucketId', $document->getAttribute('bucketId')) - // ->setParam('files.{scope}.storage.size', $document->getAttribute('sizeOriginal') * $multiplier) - // ->setParam('files.{scope}.count.total', 1 * $multiplier); - // } elseif (strpos($collection, 'database_') === 0) { - // $usage - // ->setParam('databaseId', $document->getAttribute('databaseId')); - // if (strpos($collection, '_collection_') !== false) { - // $usage - // ->setParam('collectionId', $document->getAttribute('$collectionId')) - // ->setParam('documents.{scope}.count.total', 1 * $multiplier); - // } else { - // $usage->setParam('collections.{scope}.count.total', 1 * $multiplier); - // } - // } break; } }; @@ -488,10 +472,5 @@ App::shutdown() ->addMetric("{$project->getId()}", "network.inbound", $request->getSize() + $fileSize) ->addMetric("{$project->getId()}", "network.outbound", $response->getSize()) ->trigger(); - - // $usage - // ->setParam('project.{scope}.network.inbound', $request->getSize() + $fileSize) - // ->setParam('project.{scope}.network.outbound', $response->getSize()) - // ->submit(); } }); diff --git a/app/init.php b/app/init.php index 85065ceb2..5a2c603f0 100644 --- a/app/init.php +++ b/app/init.php @@ -189,6 +189,7 @@ Config::load('providers', __DIR__ . '/config/providers.php'); Config::load('platforms', __DIR__ . '/config/platforms.php'); Config::load('collections', __DIR__ . '/config/collections.php'); Config::load('runtimes', __DIR__ . '/config/runtimes.php'); +Config::load('usage', __DIR__ . '/config/usage.php'); Config::load('roles', __DIR__ . '/config/roles.php'); // User roles and scopes Config::load('scopes', __DIR__ . '/config/scopes.php'); // User roles and scopes Config::load('services', __DIR__ . '/config/services.php'); // List of services diff --git a/src/Appwrite/Utopia/Response/Model/UsageBuckets.php b/src/Appwrite/Utopia/Response/Model/UsageBuckets.php index 8c6c81f23..40d5c6c4a 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageBuckets.php +++ b/src/Appwrite/Utopia/Response/Model/UsageBuckets.php @@ -30,34 +30,6 @@ class UsageBuckets extends Model 'example' => [], 'array' => true ]) - ->addRule('filesCreate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for files created.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('filesRead', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for files read.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('filesUpdate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for files updated.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('filesDelete', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for files deleted.', - 'default' => [], - 'example' => [], - 'array' => true - ]) ; } diff --git a/src/Appwrite/Utopia/Response/Model/UsageFunctions.php b/src/Appwrite/Utopia/Response/Model/UsageFunctions.php index 7adb0d4aa..b3bfa8629 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageFunctions.php +++ b/src/Appwrite/Utopia/Response/Model/UsageFunctions.php @@ -16,58 +16,52 @@ class UsageFunctions extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('executionsTotal', [ + ->addRule('functions', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for number of function executions.', + 'description' => 'Aggregated stats for number of functions.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('executionsFailure', [ + ->addRule('deployments', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function execution failures.', + 'description' => 'Aggregated stats for number of function deployments.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('executionsSuccess', [ + ->addRule('deploymentsStorage', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function execution successes.', + 'description' => 'Aggregated stats for function deployments storage.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('executionsTime', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function execution duration.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('buildsTotal', [ + ->addRule('builds', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of function builds.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('buildsFailure', [ + ->addRule('buildsStorage', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function build failures.', + 'description' => 'Aggregated stats for function build storage.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('buildsSuccess', [ + ->addRule('executions', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function build successes.', + 'description' => 'Aggregated stats for number of function executions.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('buildsTime', [ + + ->addRule('executionsCompute', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function build duration.', + 'description' => 'Aggregated stats for function execution compute.', 'default' => [], 'example' => [], 'array' => true diff --git a/src/Appwrite/Utopia/Response/Model/UsageStorage.php b/src/Appwrite/Utopia/Response/Model/UsageStorage.php index 7e3c08e12..c9950a255 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageStorage.php +++ b/src/Appwrite/Utopia/Response/Model/UsageStorage.php @@ -16,9 +16,9 @@ class UsageStorage extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('storage', [ + ->addRule('buckets', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for the occupied storage size (in bytes).', + 'description' => 'Aggregated stats for total number of buckets.', 'default' => [], 'example' => [], 'array' => true @@ -30,65 +30,9 @@ class UsageStorage extends Model 'example' => [], 'array' => true ]) - ->addRule('bucketsCount', [ + ->addRule('filesStorage', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for total number of buckets.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('bucketsCreate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for buckets created.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('bucketsRead', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for buckets read.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('bucketsUpdate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for buckets updated.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('bucketsDelete', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for buckets deleted.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('filesCreate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for files created.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('filesRead', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for files read.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('filesUpdate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for files updated.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('filesDelete', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for files deleted.', + 'description' => 'Aggregated stats for the occupied storage size (in bytes).', 'default' => [], 'example' => [], 'array' => true From 4c6b6d00e85a643037b502bbc37eee62fd15adac Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 7 Dec 2022 19:56:38 +0200 Subject: [PATCH 09/94] functions api usage --- app/controllers/api/functions.php | 32 +++--- app/controllers/api/storage.php | 160 +++++++++++++++--------------- app/controllers/shared/api.php | 66 ++++++------ app/workers/usage.php | 25 +---- src/Appwrite/Event/Usage.php | 4 +- 5 files changed, 127 insertions(+), 160 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 87b5425bc..0e184b4cd 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1361,8 +1361,7 @@ App::get('/v1/functions/:functionId/usage') ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d']), 'Date range.', true) ->inject('response') ->inject('dbForProject') - ->inject('project') - ->action(function (string $functionId, string $range, Response $response, Database $dbForProject, Document $project) { + ->action(function (string $functionId, string $range, Response $response, Database $dbForProject) { $function = $dbForProject->getDocument('functions', $functionId); @@ -1374,12 +1373,12 @@ App::get('/v1/functions/:functionId/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - $project->getId() . '.function.' . $function->getId() . '.deployments', - $project->getId() . '.function.' . $function->getId() . '.deployments.storage', - $project->getId() . '.' . $function->getId() . '.builds', - $project->getId() . '.' . $function->getId() . '.builds.storage', - $project->getId() . '.' . $function->getId() . '.executions', - $project->getId() . '.' . $function->getId() . '.executions.compute', + 'function.' . $function->getId() . '.deployments', + 'function.' . $function->getId() . '.deployments.storage', + $function->getId() . '.builds', + $function->getId() . '.builds.storage', + $function->getId() . '.executions', + $function->getId() . '.executions.compute', ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { @@ -1444,20 +1443,19 @@ App::get('/v1/functions/usage') ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d']), 'Date range.', true) ->inject('response') ->inject('dbForProject') - ->inject('project') - ->action(function (string $range, Response $response, Database $dbForProject, Document $project) { + ->action(function (string $range, Response $response, Database $dbForProject) { $periods = Config::getParam('usage', []); $stats = $usage = []; $days = $periods[$range]; $metrics = [ - $project->getId() . '.functions', - $project->getId() . '.deployments', - $project->getId() . '.deployments.storage', - $project->getId() . '.builds', - $project->getId() . '.builds.storage', - $project->getId() . '.executions', - $project->getId() . '.executions.compute', + 'functions', + 'deployments', + 'deployments.storage', + 'builds', + 'builds.storage', + 'executions', + 'executions.compute', ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 3a6ca2981..b32f006ab 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -1413,6 +1413,81 @@ App::delete('/v1/storage/buckets/:bucketId/files/:fileId') $response->noContent(); }); +App::get('/v1/storage/:bucketId/usage') + ->desc('Get usage stats for storage bucket') + ->groups(['api', 'storage']) + ->label('scope', 'files.read') + ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) + ->label('sdk.namespace', 'storage') + ->label('sdk.method', 'getBucketUsage') + ->label('sdk.response.code', Response::STATUS_CODE_OK) + ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) + ->label('sdk.response.model', Response::MODEL_USAGE_BUCKETS) + ->param('bucketId', '', new UID(), 'Bucket ID.') + ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), 'Date range.', true) + ->inject('response') + ->inject('dbForProject') + ->action(function (string $bucketId, string $range, Response $response, Database $dbForProject) { + + $bucket = $dbForProject->getDocument('buckets', $bucketId); + + if ($bucket->isEmpty()) { + throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); + } + + $periods = Config::getParam('usage', []); + $stats = $usage = []; + $days = $periods[$range]; + $metrics = [ + $bucket->getId() . '.files', + $bucket->getId() . '.files.storage', + ]; + + Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $days['limit']; + $period = $days['period']; + $results = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + $stats[$metric] = []; + foreach ($results as $result) { + $stats[$metric][$result->getAttribute('time')] = [ + 'value' => $result->getAttribute('value'), + ]; + } + } + }); + + $format = match ($days['period']) { + '1h' => 'Y-m-d\TH:00:00.000P', + '1d' => 'Y-m-d\T00:00:00.000P', + }; + + foreach ($metrics as $metric) { + $usage[$metric] = []; + $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { + $leap += $days['factor']; + $formatDate = date($format, $leap); + $usage[$metric][] = [ + 'value' => $stats[$metric][$formatDate]['value'] ?? 0, + 'date' => $formatDate, + ]; + } + $usage[$metric] = array_reverse($usage[$metric]); + } + + $response->dynamic(new Document([ + 'range' => $range, + 'filesCount' => $usage[$metrics[0]], + 'filesStorage' => $usage[$metrics[1]], + ]), Response::MODEL_USAGE_BUCKETS); + }); + App::get('/v1/storage/usage') ->desc('Get usage stats for storage') ->groups(['api', 'storage']) @@ -1426,16 +1501,15 @@ App::get('/v1/storage/usage') ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), 'Date range.', true) ->inject('response') ->inject('dbForProject') - ->inject('project') - ->action(function (string $range, Response $response, Database $dbForProject, Document $project) { + ->action(function (string $range, Response $response, Database $dbForProject) { $periods = Config::getParam('usage', []); $stats = $usage = []; $days = $periods[$range]; $metrics = [ - $project->getId() . '.buckets', - $project->getId() . '.files', - $project->getId() . '.files.storage', + 'buckets', + 'files', + 'files.storage', ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { @@ -1483,79 +1557,3 @@ App::get('/v1/storage/usage') 'filesStorage' => $usage[$metrics[2]], ]), Response::MODEL_USAGE_STORAGE); }); - -App::get('/v1/storage/:bucketId/usage') - ->desc('Get usage stats for a storage bucket') - ->groups(['api', 'storage']) - ->label('scope', 'files.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'storage') - ->label('sdk.method', 'getBucketUsage') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USAGE_BUCKETS) - ->param('bucketId', '', new UID(), 'Bucket ID.') - ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), 'Date range.', true) - ->inject('response') - ->inject('dbForProject') - ->inject('project') - ->action(function (string $bucketId, string $range, Response $response, Database $dbForProject, Document $project) { - - $bucket = $dbForProject->getDocument('buckets', $bucketId); - - if ($bucket->isEmpty()) { - throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND); - } - - $periods = Config::getParam('usage', []); - $stats = $usage = []; - $days = $periods[$range]; - $metrics = [ - $project->getId() . '.' . $bucket->getId() . '.files', - $project->getId() . '.' . $bucket->getId() . '.files.storage', - ]; - - Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $days['limit']; - $period = $days['period']; - $results = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); - $stats[$metric] = []; - foreach ($results as $result) { - $stats[$metric][$result->getAttribute('time')] = [ - 'value' => $result->getAttribute('value'), - ]; - } - } - }); - - $format = match ($days['period']) { - '1h' => 'Y-m-d\TH:00:00.000P', - '1d' => 'Y-m-d\T00:00:00.000P', - }; - - foreach ($metrics as $metric) { - $usage[$metric] = []; - $leap = time() - ($days['limit'] * $days['factor']); - while ($leap < time()) { - $leap += $days['factor']; - $formatDate = date($format, $leap); - $usage[$metric][] = [ - 'value' => $stats[$metric][$formatDate]['value'] ?? 0, - 'date' => $formatDate, - ]; - } - $usage[$metric] = array_reverse($usage[$metric]); - } - - $response->dynamic(new Document([ - 'range' => $range, - 'filesCount' => $usage[$metrics[0]], - 'filesStorage' => $usage[$metrics[1]], - ]), Response::MODEL_USAGE_BUCKETS); - }); diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 4e0abb7e9..6ac847741 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -58,55 +58,55 @@ $databaseListener = function (string $event, Document $document, Document $proje switch (true) { case $document->getCollection() === 'users': - $queueForUsage->addMetric("{$project->getId()}", "users", $value); // per project + $queueForUsage->addMetric("users", $value); // per project break; case $document->getCollection() === 'teams': - $queueForUsage->addMetric("{$project->getId()}", "teams", $value); // per project + $queueForUsage->addMetric("teams", $value); // per project break; case $document->getCollection() === 'sessions': - $queueForUsage->addMetric("{$project->getId()}", "sessions", $value); // per project + $queueForUsage->addMetric("sessions", $value); // per project break; case $document->getCollection() === 'databases': - $queueForUsage->addMetric("{$project->getId()}", "databases", $value); // per project + $queueForUsage->addMetric("databases", $value); // per project break; case str_starts_with($document->getCollection(), 'database_'): // collections - $queueForUsage->addMetric("{$project->getId()}.{$document['databaseId']}", "collections", $value); // per database - $queueForUsage->addMetric("{$project->getId()}", "collections", $value); // per project + $queueForUsage->addMetric("{$document['databaseId']}" . ".collections", $value); // per database + $queueForUsage->addMetric("collections", $value); // per project break; case $document->getCollection() === 'documents': - $queueForUsage->addMetric("{$project->getId()}.{$document['databaseId']}.{$document['collectionId']}", "documents", $value); // per collection - $queueForUsage->addMetric("{$project->getId()}.{$document['databaseId']}", "documents", $value); // per database - $queueForUsage->addMetric("{$project->getId()}", "documents", $value); // per project + $queueForUsage->addMetric("{$document['databaseId']}" . "." . "{$document['collectionId']}" . ".documents", $value); // per collection + $queueForUsage->addMetric("{$document['databaseId']}" . ".documents", $value); // per database + $queueForUsage->addMetric("documents", $value); // per project break; case $document->getCollection() === 'buckets': - $queueForUsage->addMetric("{$project->getId()}", "buckets", $value); // per project + $queueForUsage->addMetric("buckets", $value); // per project break; case str_starts_with($document->getCollection(), 'bucket_'): // files - $queueForUsage->addMetric("{$project->getId()}.{$document['bucketId']}", "files", $value); // per bucket - $queueForUsage->addMetric("{$project->getId()}.{$document['bucketId']}", "files.storage", $document->getAttribute('sizeOriginal') * $value); // per bucket - $queueForUsage->addMetric("{$project->getId()}", "files", $value); // per project - $queueForUsage->addMetric("{$project->getId()}", "files.storage", $document->getAttribute('sizeOriginal') * $value); // per project + $queueForUsage->addMetric("{$document['bucketId']}" . ".files", $value); // per bucket + $queueForUsage->addMetric("{$document['bucketId']}" . ".files.storage", $document->getAttribute('sizeOriginal') * $value); // per bucket + $queueForUsage->addMetric("files", $value); // per project + $queueForUsage->addMetric("files.storage", $document->getAttribute('sizeOriginal') * $value); // per project break; case $document->getCollection() === 'functions': - $queueForUsage->addMetric("{$project->getId()}", "functions", $value); // per project + $queueForUsage->addMetric("functions", $value); // per project break; case $document->getCollection() === 'deployments': - $queueForUsage->addMetric("{$project->getId()}.{$document['resourceType']}.{$document['resourceId']}", "deployments", $value); // per function - $queueForUsage->addMetric("{$project->getId()}.{$document['resourceType']}.{$document['resourceId']}", "deployments.storage", $document->getAttribute('size') * $value); // per function - $queueForUsage->addMetric("{$project->getId()}", "deployments", $value); // per project - $queueForUsage->addMetric("{$project->getId()}", "deployments.storage", $document->getAttribute('size') * $value); // per project + $queueForUsage->addMetric("{$document['resourceType']}" . "." . "{$document['resourceId']}" . ".deployments", $value); // per function + $queueForUsage->addMetric("{$document['resourceType']}" . "." . "{$document['resourceId']}" . ".deployments.storage", $document->getAttribute('size') * $value); // per function + $queueForUsage->addMetric("deployments", $value); // per project + $queueForUsage->addMetric("deployments.storage", $document->getAttribute('size') * $value); // per project break; case $document->getCollection() === 'builds': // needs to extract functionId - $queueForUsage->addMetric("{$project->getId()}.{$document['functionId']}", "builds", $value); // per function - $queueForUsage->addMetric("{$project->getId()}.{$document['functionId']}", "builds.storage", $document->getAttribute('size') * $value); // per function - $queueForUsage->addMetric("{$project->getId()}", "builds", $value); // per project - $queueForUsage->addMetric("{$project->getId()}", "builds.storage", $document->getAttribute('size') * $value); // per project + $queueForUsage->addMetric("{$document['functionId']}" . ".builds", $value); // per function + $queueForUsage->addMetric("{$document['functionId']}" . ".builds.storage", $document->getAttribute('size') * $value); // per function + $queueForUsage->addMetric("builds", $value); // per project + $queueForUsage->addMetric("builds.storage", $document->getAttribute('size') * $value); // per project break; case $document->getCollection() === 'executions': - $queueForUsage->addMetric("{$project->getId()}.{$document['functionId']}", "executions", $value); // per function - $queueForUsage->addMetric("{$project->getId()}.{$document['functionId']}", "executions.compute", $document->getAttribute('duration') * $value); // per function - $queueForUsage->addMetric("{$project->getId()}", "executions", $value); // per project - $queueForUsage->addMetric("{$project->getId()}", "executions.compute", $document->getAttribute('duration') * $value); // per project + $queueForUsage->addMetric("{$document['functionId']}" . ".executions", $value); // per function + $queueForUsage->addMetric("{$document['functionId']}" . ".executions.compute", $document->getAttribute('duration') * $value); // per function + $queueForUsage->addMetric("executions", $value); // per project + $queueForUsage->addMetric("executions.compute", $document->getAttribute('duration') * $value); // per project break; default: break; @@ -214,14 +214,6 @@ App::init() ->setProject($project) ->setUser($user); - // $usage - // ->setParam('projectInternalId', $project->getInternalId()) - // ->setParam('projectId', $project->getId()) - // ->setParam('project.{scope}.network.requests', 1) - // ->setParam('httpMethod', $request->getMethod()) - // ->setParam('project.{scope}.network.inbound', 0) - // ->setParam('project.{scope}.network.outbound', 0); - $deletes->setProject($project); $database->setProject($project); @@ -469,8 +461,8 @@ App::shutdown() $queueForUsage ->setProject($project) - ->addMetric("{$project->getId()}", "network.inbound", $request->getSize() + $fileSize) - ->addMetric("{$project->getId()}", "network.outbound", $response->getSize()) + ->addMetric("network.inbound", $request->getSize() + $fileSize) + ->addMetric("network.outbound", $response->getSize()) ->trigger(); } }); diff --git a/app/workers/usage.php b/app/workers/usage.php index b86dcd6f9..40eaaa9e9 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -17,12 +17,6 @@ $periods['1h'] = 'Y-m-d H:00'; $periods['1d'] = 'Y-m-d 00:00'; $periods['inf'] = 'Y-m-d 00:00'; -//$stats = new Table(10000, 1); -//$stats->column('namespace', Table::TYPE_STRING, 64); -//$stats->column('key', Table::TYPE_STRING, 64); -//$stats->column('value', Table::TYPE_INT); -//$stats->create(); - $server->job() ->inject('message') ->action(function (Message $message) use (&$stats) { @@ -30,33 +24,20 @@ $server->job() $project = new Document($payload['project'] ?? []); foreach ($payload['metrics'] ?? [] as $metric) { - $uniq = md5($metric['namespace'] . $metric['key']); - -// if ($stats->exists($uniq)) { -// $stats->incr($uniq, 'value', $metric['value']); -// continue; -// } -// -// $stats->set($uniq, [ -// 'projectInternalId' => $project->getInternalId(), -// 'database' => $project->getAttribute('database'), -// 'key' => $metric['key'], -// 'value' => $metric['value'], -// ]); -// + $uniq = md5($metric['key']); if (!isset($stats[$uniq])) { $stats[$uniq] = [ 'projectInternalId' => $project->getInternalId(), 'database' => $project->getAttribute('database'), - 'key' => $metric['namespace'] . '.' . $metric['key'], + 'key' => $metric['key'], 'value' => $metric['value'] ]; continue; } - $stats[$uniq]['value'] += $metric['value']; + $stats[$uniq]['value'] += $metric['value']; } }); diff --git a/src/Appwrite/Event/Usage.php b/src/Appwrite/Event/Usage.php index 1da63383d..00ef7c17f 100644 --- a/src/Appwrite/Event/Usage.php +++ b/src/Appwrite/Event/Usage.php @@ -17,15 +17,13 @@ class Usage extends Event /** * Add metric. * - * @param string $namespace * @param string $key * @param int $value * @return self */ - public function addMetric(string $namespace, string $key, int $value): self + public function addMetric(string $key, int $value): self { $this->metrics[] = [ - 'namespace' => $namespace, 'key' => $key, 'value' => $value, ]; From 2d6c0ac8446ed6f9f953316589bd7e9027a8448a Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 8 Dec 2022 15:55:18 +0200 Subject: [PATCH 10/94] functions api usage --- app/controllers/shared/api.php | 24 +++++++++++++++++++++--- app/workers/usage.php | 26 +++++++++++++++++--------- 2 files changed, 38 insertions(+), 12 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 6ac847741..1ea054ec3 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -48,7 +48,7 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar return $label; }; -$databaseListener = function (string $event, Document $document, Document $project, Usage $queueForUsage) { +$databaseListener = function (string $event, Document $document, Document $project, Usage $queueForUsage, Database $dbForProject) { $value = 1; if ($event === Database::EVENT_DOCUMENT_DELETE) { @@ -80,6 +80,24 @@ $databaseListener = function (string $event, Document $document, Document $proje break; case $document->getCollection() === 'buckets': $queueForUsage->addMetric("buckets", $value); // per project + if ($event === Database::EVENT_DOCUMENT_DELETE) { + /** + * Needs to deduct files aggregation from project on bucket deletion scenario. + */ + $bucketFiles = $dbForProject->getDocument('stats', md5("0_inf_" . "{$document->getId()}" . ".files")); + $projectFiles = $dbForProject->getDocument('stats', md5("0_inf_files")); + if (!$bucketFiles->isEmpty()) { + $projectFiles->setAttribute('value', $projectFiles['value'] - $bucketFiles['value']); + $dbForProject->updateDocument('stats', $projectFiles->getId(), $projectFiles); + } + + $bucketStorage = $dbForProject->getDocument('stats', md5("0_inf_" . "{$document->getId()}" . ".files.storage")); + $projectStorage = $dbForProject->getDocument('stats', md5("0_inf_files.storage")); + if (!$bucketStorage->isEmpty()) { + $projectStorage->setAttribute('value', $projectStorage['value'] - $bucketStorage['value']); + $dbForProject->updateDocument('stats', $projectStorage->getId(), $projectStorage); + } + } break; case str_starts_with($document->getCollection(), 'bucket_'): // files $queueForUsage->addMetric("{$document['bucketId']}" . ".files", $value); // per bucket @@ -218,8 +236,8 @@ App::init() $database->setProject($project); $dbForProject - ->on(Database::EVENT_DOCUMENT_CREATE, fn ($event, Document $document) => $databaseListener($event, $document, $project, $queueForUsage)) - ->on(Database::EVENT_DOCUMENT_DELETE, fn ($event, Document $document) => $databaseListener($event, $document, $project, $queueForUsage)) + ->on(Database::EVENT_DOCUMENT_CREATE, fn ($event, Document $document) => $databaseListener($event, $document, $project, $queueForUsage, $dbForProject)) + ->on(Database::EVENT_DOCUMENT_DELETE, fn ($event, Document $document) => $databaseListener($event, $document, $project, $queueForUsage, $dbForProject)) ; $useCache = $route->getLabel('cache', false); diff --git a/app/workers/usage.php b/app/workers/usage.php index 40eaaa9e9..f4bf5ebd2 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -2,7 +2,6 @@ require_once __DIR__ . '/../worker.php'; -use Swoole\Table; use Swoole\Timer; use Utopia\App; use Utopia\Database\Database; @@ -11,6 +10,9 @@ use Utopia\Database\Validator\Authorization; use Utopia\Queue\Message; use Utopia\CLI\Console; +Authorization::disable(); +Authorization::setDefaultStatus(false); + $stats = []; $periods['1h'] = 'Y-m-d H:00'; @@ -55,8 +57,10 @@ $server foreach ($slice as $metric) { foreach ($periods as $period => $format) { $time = date($format, time()); - $id = \md5("{$time}_{$period}_{$metric['key']}"); - + $timestamp = $period === 'inf' ? 0 : $time; + $id = \md5("{$timestamp}_{$period}_{$metric['key']}"); + var_dump("{$timestamp}_{$period}_{$metric['key']}"); + var_dump($id); $adapter = new Database( $pools ->get($metric['database']) @@ -68,10 +72,10 @@ $server $adapter->setNamespace('_' . $metric['projectInternalId']); try { - $document = Authorization::skip(fn() =>$adapter->getDocument('stats', $id)); + $document = $adapter->getDocument('stats', $id); if ($document->isEmpty()) { - console::log("{$period}, {$time}, {$metric['key']}={$metric['value']}"); - Authorization::skip(fn() => $adapter->createDocument('stats', new Document([ + //console::log("{$period}, {$time}, {$metric['key']}={$metric['value']}"); + $adapter->createDocument('stats', new Document([ '$id' => $id, 'period' => $period, 'time' => $time, @@ -79,11 +83,15 @@ $server 'value' => $metric['value'], 'type' => 0, 'region' => App::getEnv('_APP_REGION', 'default'), - ]))); + ])); } else { $value = $document->getAttribute('value') + $metric['value']; - console::info("{$document->getAttribute('period')}, {$document->getAttribute('time')}, {$document->getAttribute('metric')} = {$value}"); - Authorization::skip(fn() => $adapter->updateDocument('stats', $document->getId(), $document->setAttribute('value', $value))); + //console::info("{$document->getAttribute('period')}, {$document->getAttribute('time')}, {$document->getAttribute('metric')} = {$value}"); + $adapter->updateDocument( + 'stats', + $document->getId(), + $document->setAttribute('value', $document->getAttribute('value') + $metric['value']) + ); } } catch (\Exception $e) { console::error($e->getMessage()); From 70394ff1bb7f30706c5c9e43e7763baa62d3332d Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 8 Dec 2022 21:06:55 +0200 Subject: [PATCH 11/94] nested object calculation --- app/controllers/shared/api.php | 63 +++++++++++++++++++++++++++++----- app/workers/usage.php | 16 ++++----- 2 files changed, 62 insertions(+), 17 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 1ea054ec3..3be267f02 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -68,6 +68,22 @@ $databaseListener = function (string $event, Document $document, Document $proje break; case $document->getCollection() === 'databases': $queueForUsage->addMetric("databases", $value); // per project + if ($event === Database::EVENT_DOCUMENT_DELETE) { + // Documents + $dbDocuments = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".documents")); + $projectDocuments = $dbForProject->getDocument('stats', md5("_inf_documents")); + if (!$dbDocuments->isEmpty()) { + $projectDocuments->setAttribute('value', $projectDocuments['value'] - $dbDocuments['value']); + $dbForProject->updateDocument('stats', $projectDocuments->getId(), $projectDocuments); + } + // Collections + $dbCollections = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".collections")); + $projectCollections = $dbForProject->getDocument('stats', md5("_inf_collections")); + if (!$dbCollections->isEmpty()) { + $projectCollections->setAttribute('value', $projectCollections['value'] - $dbCollections['value']); + $dbForProject->updateDocument('stats', $projectCollections->getId(), $projectCollections); + } + } break; case str_starts_with($document->getCollection(), 'database_'): // collections $queueForUsage->addMetric("{$document['databaseId']}" . ".collections", $value); // per database @@ -81,18 +97,16 @@ $databaseListener = function (string $event, Document $document, Document $proje case $document->getCollection() === 'buckets': $queueForUsage->addMetric("buckets", $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { - /** - * Needs to deduct files aggregation from project on bucket deletion scenario. - */ - $bucketFiles = $dbForProject->getDocument('stats', md5("0_inf_" . "{$document->getId()}" . ".files")); - $projectFiles = $dbForProject->getDocument('stats', md5("0_inf_files")); + // bucket Files + $bucketFiles = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".files")); + $projectFiles = $dbForProject->getDocument('stats', md5("_inf_files")); if (!$bucketFiles->isEmpty()) { $projectFiles->setAttribute('value', $projectFiles['value'] - $bucketFiles['value']); $dbForProject->updateDocument('stats', $projectFiles->getId(), $projectFiles); } - - $bucketStorage = $dbForProject->getDocument('stats', md5("0_inf_" . "{$document->getId()}" . ".files.storage")); - $projectStorage = $dbForProject->getDocument('stats', md5("0_inf_files.storage")); + // bucket Storage + $bucketStorage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".files.storage")); + $projectStorage = $dbForProject->getDocument('stats', md5("_inf_files.storage")); if (!$bucketStorage->isEmpty()) { $projectStorage->setAttribute('value', $projectStorage['value'] - $bucketStorage['value']); $dbForProject->updateDocument('stats', $projectStorage->getId(), $projectStorage); @@ -107,6 +121,39 @@ $databaseListener = function (string $event, Document $document, Document $proje break; case $document->getCollection() === 'functions': $queueForUsage->addMetric("functions", $value); // per project + if ($event === Database::EVENT_DOCUMENT_DELETE) { + // Deployments Storage + $functionDeployments = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getId()}" . ".deployments")); + $projectDeployments = $dbForProject->getDocument('stats', md5("_inf_deployments")); + if (!$functionDeployments->isEmpty()) { + $projectDeployments->setAttribute('value', $projectDeployments['value'] - $functionDeployments['value']); + $projectDeployments->updateDocument('stats', $projectDeployments->getId(), $projectDeployments); + } + // Deployments Storage + $functionDeploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getId()}" . ".deployments.storage")); + $projectDeploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function.deployments.storage")); + if (!$functionDeployments->isEmpty()) { + $projectDeploymentsStorage->setAttribute('value', $projectDeploymentsStorage['value'] - $functionDeploymentsStorage['value']); + $projectDeploymentsStorage->updateDocument('stats', $projectDeploymentsStorage->getId(), $projectDeploymentsStorage); + } + + //TODO needs to find a solution for builds + + // Executions + $functionExecutions = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".executions")); + $projectExecutions = $dbForProject->getDocument('stats', md5("_inf_executions")); + if (!$functionExecutions->isEmpty()) { + $projectExecutions->setAttribute('value', $projectExecutions['value'] - $functionExecutions['value']); + $projectExecutions->updateDocument('stats', $projectExecutions->getId(), $projectExecutions); + } + // Executions Compute + $functionExecutionsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".executions.compute")); + $projectExecutionsCompute = $dbForProject->getDocument('stats', md5("_inf_executions.compute")); + if (!$functionExecutionsCompute->isEmpty()) { + $projectExecutionsCompute->setAttribute('value', $projectExecutionsCompute['value'] - $functionExecutionsCompute['value']); + $projectExecutionsCompute->updateDocument('stats', $projectExecutionsCompute->getId(), $projectExecutionsCompute); + } + } break; case $document->getCollection() === 'deployments': $queueForUsage->addMetric("{$document['resourceType']}" . "." . "{$document['resourceId']}" . ".deployments", $value); // per function diff --git a/app/workers/usage.php b/app/workers/usage.php index f4bf5ebd2..74f2a2aba 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -15,9 +15,9 @@ Authorization::setDefaultStatus(false); $stats = []; -$periods['1h'] = 'Y-m-d H:00'; -$periods['1d'] = 'Y-m-d 00:00'; -$periods['inf'] = 'Y-m-d 00:00'; +$periods['1h'] = 'Y-m-d H:00'; +$periods['1d'] = 'Y-m-d 00:00'; +$periods['inf'] = '0000-00-00 00:00'; $server->job() ->inject('message') @@ -56,11 +56,8 @@ $server foreach ($slice as $metric) { foreach ($periods as $period => $format) { - $time = date($format, time()); - $timestamp = $period === 'inf' ? 0 : $time; - $id = \md5("{$timestamp}_{$period}_{$metric['key']}"); - var_dump("{$timestamp}_{$period}_{$metric['key']}"); - var_dump($id); + $time = 'inf' === $period ? null : date($format, time()); + $id = \md5("{$time}_{$period}_{$metric['key']}"); $adapter = new Database( $pools ->get($metric['database']) @@ -95,8 +92,9 @@ $server } } catch (\Exception $e) { console::error($e->getMessage()); + } finally { + $pools->reclaim(); } - $pools->reclaim(); } } }); From e2e3d99410fa7e33bb233b856573e48aa3c73ae5 Mon Sep 17 00:00:00 2001 From: shimon Date: Fri, 9 Dec 2022 12:41:22 +0200 Subject: [PATCH 12/94] Switch to decreaseDocumentAttribute --- app/controllers/shared/api.php | 45 ++-- app/workers/usage.php | 7 +- composer.json | 2 +- composer.lock | 423 ++++++++++++++++++++++++++++++--- 4 files changed, 407 insertions(+), 70 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 3be267f02..c3faf1ead 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -69,19 +69,18 @@ $databaseListener = function (string $event, Document $document, Document $proje case $document->getCollection() === 'databases': $queueForUsage->addMetric("databases", $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { - // Documents - $dbDocuments = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".documents")); - $projectDocuments = $dbForProject->getDocument('stats', md5("_inf_documents")); - if (!$dbDocuments->isEmpty()) { - $projectDocuments->setAttribute('value', $projectDocuments['value'] - $dbDocuments['value']); - $dbForProject->updateDocument('stats', $projectDocuments->getId(), $projectDocuments); - } // Collections $dbCollections = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".collections")); $projectCollections = $dbForProject->getDocument('stats', md5("_inf_collections")); if (!$dbCollections->isEmpty()) { - $projectCollections->setAttribute('value', $projectCollections['value'] - $dbCollections['value']); - $dbForProject->updateDocument('stats', $projectCollections->getId(), $projectCollections); + $dbForProject->decreaseDocumentAttribute('stats', $projectCollections->getId(), 'value', $dbCollections['value']); + } + + // Documents + $dbDocuments = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".documents")); + $projectDocuments = $dbForProject->getDocument('stats', md5("_inf_documents")); + if (!$dbDocuments->isEmpty()) { + $dbForProject->decreaseDocumentAttribute('stats', $projectDocuments->getId(), 'value', $dbDocuments['value']); } } break; @@ -98,18 +97,16 @@ $databaseListener = function (string $event, Document $document, Document $proje $queueForUsage->addMetric("buckets", $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { // bucket Files - $bucketFiles = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".files")); + $bucketFiles = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".files")); $projectFiles = $dbForProject->getDocument('stats', md5("_inf_files")); if (!$bucketFiles->isEmpty()) { - $projectFiles->setAttribute('value', $projectFiles['value'] - $bucketFiles['value']); - $dbForProject->updateDocument('stats', $projectFiles->getId(), $projectFiles); + $dbForProject->decreaseDocumentAttribute('stats', $projectFiles->getId(), 'value', $bucketFiles['value']); } // bucket Storage $bucketStorage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".files.storage")); $projectStorage = $dbForProject->getDocument('stats', md5("_inf_files.storage")); if (!$bucketStorage->isEmpty()) { - $projectStorage->setAttribute('value', $projectStorage['value'] - $bucketStorage['value']); - $dbForProject->updateDocument('stats', $projectStorage->getId(), $projectStorage); + $dbForProject->decreaseDocumentAttribute('stats', $projectStorage->getId(), 'value', $bucketStorage['value']); } } break; @@ -124,34 +121,30 @@ $databaseListener = function (string $event, Document $document, Document $proje if ($event === Database::EVENT_DOCUMENT_DELETE) { // Deployments Storage $functionDeployments = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getId()}" . ".deployments")); - $projectDeployments = $dbForProject->getDocument('stats', md5("_inf_deployments")); + $projectDeployments = $dbForProject->getDocument('stats', md5("_inf_deployments")); if (!$functionDeployments->isEmpty()) { - $projectDeployments->setAttribute('value', $projectDeployments['value'] - $functionDeployments['value']); - $projectDeployments->updateDocument('stats', $projectDeployments->getId(), $projectDeployments); + $dbForProject->decreaseDocumentAttribute('stats', $projectDeployments->getId(), 'value', $functionDeployments['value']); } // Deployments Storage $functionDeploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getId()}" . ".deployments.storage")); - $projectDeploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function.deployments.storage")); + $projectDeploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function.deployments.storage")); if (!$functionDeployments->isEmpty()) { - $projectDeploymentsStorage->setAttribute('value', $projectDeploymentsStorage['value'] - $functionDeploymentsStorage['value']); - $projectDeploymentsStorage->updateDocument('stats', $projectDeploymentsStorage->getId(), $projectDeploymentsStorage); + $dbForProject->decreaseDocumentAttribute('stats', $projectDeploymentsStorage->getId(), 'value', $functionDeploymentsStorage['value']); } //TODO needs to find a solution for builds // Executions $functionExecutions = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".executions")); - $projectExecutions = $dbForProject->getDocument('stats', md5("_inf_executions")); + $projectExecutions = $dbForProject->getDocument('stats', md5("_inf_executions")); if (!$functionExecutions->isEmpty()) { - $projectExecutions->setAttribute('value', $projectExecutions['value'] - $functionExecutions['value']); - $projectExecutions->updateDocument('stats', $projectExecutions->getId(), $projectExecutions); + $dbForProject->decreaseDocumentAttribute('stats', $projectExecutions->getId(), 'value', $functionExecutions['value']); } // Executions Compute $functionExecutionsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".executions.compute")); - $projectExecutionsCompute = $dbForProject->getDocument('stats', md5("_inf_executions.compute")); + $projectExecutionsCompute = $dbForProject->getDocument('stats', md5("_inf_executions.compute")); if (!$functionExecutionsCompute->isEmpty()) { - $projectExecutionsCompute->setAttribute('value', $projectExecutionsCompute['value'] - $functionExecutionsCompute['value']); - $projectExecutionsCompute->updateDocument('stats', $projectExecutionsCompute->getId(), $projectExecutionsCompute); + $dbForProject->decreaseDocumentAttribute('stats', $projectExecutionsCompute->getId(), 'value', $functionExecutionsCompute['value']); } } break; diff --git a/app/workers/usage.php b/app/workers/usage.php index 74f2a2aba..f48cac9a6 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -82,13 +82,8 @@ $server 'region' => App::getEnv('_APP_REGION', 'default'), ])); } else { - $value = $document->getAttribute('value') + $metric['value']; //console::info("{$document->getAttribute('period')}, {$document->getAttribute('time')}, {$document->getAttribute('metric')} = {$value}"); - $adapter->updateDocument( - 'stats', - $document->getId(), - $document->setAttribute('value', $document->getAttribute('value') + $metric['value']) - ); + $adapter->decreaseDocumentAttribute('stats', $document->getId(), 'value', $metric['value']); } } catch (\Exception $e) { console::error($e->getMessage()); diff --git a/composer.json b/composer.json index 1d6d1be25..3f6ad6ff7 100644 --- a/composer.json +++ b/composer.json @@ -49,7 +49,7 @@ "utopia-php/cache": "0.8.*", "utopia-php/cli": "0.14.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.28.*", + "utopia-php/database": "dev-increment as 0.28.0", "utopia-php/queue": "0.5.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.3.*", diff --git a/composer.lock b/composer.lock index c8b627849..f741341ef 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": "4893e1c13630239fe6a20d1c652eb484", + "content-hash": "b18e5d7f124a30671d5562d700ff41e4", "packages": [ { "name": "adhocore/jwt", @@ -345,6 +345,79 @@ }, "time": "2022-11-09T01:18:39+00:00" }, + { + "name": "composer/package-versions-deprecated", + "version": "1.11.99.5", + "source": { + "type": "git", + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0", + "php": "^7 || ^8" + }, + "replace": { + "ocramius/package-versions": "1.11.99" + }, + "require-dev": { + "composer/composer": "^1.9.3 || ^2.0@dev", + "ext-zip": "^1.13", + "phpunit/phpunit": "^6.5 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "support": { + "issues": "https://github.com/composer/package-versions-deprecated/issues", + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-01-17T14:14:24+00:00" + }, { "name": "dragonmantank/cron-expression", "version": "v3.3.1", @@ -804,17 +877,72 @@ "time": "2020-12-26T17:45:17+00:00" }, { - "name": "laravel/pint", - "version": "v1.2.0", + "name": "jean85/pretty-package-versions", + "version": "1.6.0", "source": { "type": "git", - "url": "https://github.com/laravel/pint.git", - "reference": "1d276e4c803397a26cc337df908f55c2a4e90d86" + "url": "https://github.com/Jean85/pretty-package-versions.git", + "reference": "1e0104b46f045868f11942aea058cd7186d6c303" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/1d276e4c803397a26cc337df908f55c2a4e90d86", - "reference": "1d276e4c803397a26cc337df908f55c2a4e90d86", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/1e0104b46f045868f11942aea058cd7186d6c303", + "reference": "1e0104b46f045868f11942aea058cd7186d6c303", + "shasum": "" + }, + "require": { + "composer/package-versions-deprecated": "^1.8.0", + "php": "^7.0|^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0|^8.5|^9.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Jean85\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alessandro Lai", + "email": "alessandro.lai85@gmail.com" + } + ], + "description": "A wrapper for ocramius/package-versions to get pretty versions strings", + "keywords": [ + "composer", + "package", + "release", + "versions" + ], + "support": { + "issues": "https://github.com/Jean85/pretty-package-versions/issues", + "source": "https://github.com/Jean85/pretty-package-versions/tree/1.6.0" + }, + "time": "2021-02-04T16:20:16+00:00" + }, + { + "name": "laravel/pint", + "version": "v1.2.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/pint.git", + "reference": "e60e2112ee779ce60f253695b273d1646a17d6f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/pint/zipball/e60e2112ee779ce60f253695b273d1646a17d6f1", + "reference": "e60e2112ee779ce60f253695b273d1646a17d6f1", "shasum": "" }, "require": { @@ -826,10 +954,10 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.11.0", - "illuminate/view": "^9.27", - "laravel-zero/framework": "^9.1.3", - "mockery/mockery": "^1.5.0", - "nunomaduro/larastan": "^2.2", + "illuminate/view": "^9.32.0", + "laravel-zero/framework": "^9.2.0", + "mockery/mockery": "^1.5.1", + "nunomaduro/larastan": "^2.2.0", "nunomaduro/termwind": "^1.14.0", "pestphp/pest": "^1.22.1" }, @@ -867,7 +995,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2022-09-13T15:07:15+00:00" + "time": "2022-11-29T16:25:20+00:00" }, { "name": "matomo/device-detector", @@ -938,6 +1066,74 @@ }, "time": "2022-04-11T09:58:17+00:00" }, + { + "name": "mongodb/mongodb", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/mongodb/mongo-php-library.git", + "reference": "953dbc19443aa9314c44b7217a16873347e6840d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/953dbc19443aa9314c44b7217a16873347e6840d", + "reference": "953dbc19443aa9314c44b7217a16873347e6840d", + "shasum": "" + }, + "require": { + "ext-hash": "*", + "ext-json": "*", + "ext-mongodb": "^1.8.1", + "jean85/pretty-package-versions": "^1.2", + "php": "^7.0 || ^8.0", + "symfony/polyfill-php80": "^1.19" + }, + "require-dev": { + "squizlabs/php_codesniffer": "^3.5, <3.5.5", + "symfony/phpunit-bridge": "5.x-dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "MongoDB\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Andreas Braun", + "email": "andreas.braun@mongodb.com" + }, + { + "name": "Jeremy Mikola", + "email": "jmikola@gmail.com" + } + ], + "description": "MongoDB driver library", + "homepage": "https://jira.mongodb.org/browse/PHPLIB", + "keywords": [ + "database", + "driver", + "mongodb", + "persistence" + ], + "support": { + "issues": "https://github.com/mongodb/mongo-php-library/issues", + "source": "https://github.com/mongodb/mongo-php-library/tree/1.8.0" + }, + "time": "2020-11-25T12:26:02+00:00" + }, { "name": "mustangostang/spyc", "version": "0.6.3", @@ -1461,16 +1657,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.1.1", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918" + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", - "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", "shasum": "" }, "require": { @@ -1479,7 +1675,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.1-dev" + "dev-main": "3.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -1508,7 +1704,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.1.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" }, "funding": [ { @@ -1524,7 +1720,90 @@ "type": "tidelift" } ], - "time": "2022-02-25T11:15:52+00:00" + "time": "2022-11-25T10:21:52+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" }, { "name": "utopia-php/abuse", @@ -1837,26 +2116,27 @@ }, { "name": "utopia-php/database", - "version": "0.28.0", + "version": "dev-increment", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "ef6506af1c09c22f5dc1e7859159d323f7fafa94" + "reference": "fc0a8bfc9826e1e64521a8e7a95904f9a999d6fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/ef6506af1c09c22f5dc1e7859159d323f7fafa94", - "reference": "ef6506af1c09c22f5dc1e7859159d323f7fafa94", + "url": "https://api.github.com/repos/utopia-php/database/zipball/fc0a8bfc9826e1e64521a8e7a95904f9a999d6fb", + "reference": "fc0a8bfc9826e1e64521a8e7a95904f9a999d6fb", "shasum": "" }, "require": { + "ext-pdo": "*", "php": ">=8.0", "utopia-php/cache": "0.8.*", - "utopia-php/framework": "0.*.*" + "utopia-php/framework": "0.*.*", + "utopia-php/mongo": "0.0.2" }, "require-dev": { "ext-mongodb": "*", - "ext-pdo": "*", "ext-redis": "*", "fakerphp/faker": "^1.14", "mongodb/mongodb": "1.8.0", @@ -1885,9 +2165,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.28.0" + "source": "https://github.com/utopia-php/database/tree/increment" }, - "time": "2022-10-31T09:58:46+00:00" + "time": "2022-12-08T08:59:37+00:00" }, { "name": "utopia-php/domains", @@ -2257,6 +2537,66 @@ }, "time": "2022-09-29T11:22:48+00:00" }, + { + "name": "utopia-php/mongo", + "version": "0.0.2", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/mongo.git", + "reference": "62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/mongo/zipball/62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e", + "reference": "62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e", + "shasum": "" + }, + "require": { + "ext-mongodb": "*", + "mongodb/mongodb": "1.8.0", + "php": ">=8.0" + }, + "require-dev": { + "fakerphp/faker": "^1.14", + "laravel/pint": "1.2.*", + "phpstan/phpstan": "1.8.*", + "phpunit/phpunit": "^9.4", + "swoole/ide-helper": "4.8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Mongo\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Wess", + "email": "wess@appwrite.io" + } + ], + "description": "A simple library to manage Mongo database", + "keywords": [ + "database", + "mongo", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/mongo/issues", + "source": "https://github.com/utopia-php/mongo/tree/0.0.2" + }, + "time": "2022-11-08T11:58:46+00:00" + }, { "name": "utopia-php/orchestration", "version": "0.9.0", @@ -3489,21 +3829,21 @@ }, { "name": "phpspec/prophecy", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" + "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be8cac52a0827776ff9ccda8c381ac5b71aeb359", + "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", + "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", "phpdocumentor/reflection-docblock": "^5.2", "sebastian/comparator": "^3.0 || ^4.0", "sebastian/recursion-context": "^3.0 || ^4.0" @@ -3550,9 +3890,9 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.16.0" }, - "time": "2021-12-08T12:19:24+00:00" + "time": "2022-11-29T15:06:56+00:00" }, { "name": "phpunit/php-code-coverage", @@ -5378,9 +5718,18 @@ "time": "2022-09-28T08:42:51+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/database", + "version": "dev-increment", + "alias": "0.28.0", + "alias_normalized": "0.28.0.0" + } + ], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "utopia-php/database": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { @@ -5404,5 +5753,5 @@ "platform-overrides": { "php": "8.0" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } From 806a775663c7cb2eeacf46b5651e20f640db5604 Mon Sep 17 00:00:00 2001 From: shimon Date: Fri, 9 Dec 2022 13:01:17 +0200 Subject: [PATCH 13/94] Switch to decreaseDocumentAttribute --- app/controllers/shared/api.php | 108 ++++++++++++++++++++++++--------- app/workers/usage.php | 8 ++- 2 files changed, 85 insertions(+), 31 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index c3faf1ead..01720b5d8 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -73,14 +73,24 @@ $databaseListener = function (string $event, Document $document, Document $proje $dbCollections = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".collections")); $projectCollections = $dbForProject->getDocument('stats', md5("_inf_collections")); if (!$dbCollections->isEmpty()) { - $dbForProject->decreaseDocumentAttribute('stats', $projectCollections->getId(), 'value', $dbCollections['value']); + $dbForProject->decreaseDocumentAttribute( + 'stats', + $projectCollections->getId(), + 'value', + $dbCollections['value'] + ); } // Documents $dbDocuments = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".documents")); $projectDocuments = $dbForProject->getDocument('stats', md5("_inf_documents")); if (!$dbDocuments->isEmpty()) { - $dbForProject->decreaseDocumentAttribute('stats', $projectDocuments->getId(), 'value', $dbDocuments['value']); + $dbForProject->decreaseDocumentAttribute( + 'stats', + $projectDocuments->getId(), + 'value', + $dbDocuments['value'] + ); } } break; @@ -89,9 +99,11 @@ $databaseListener = function (string $event, Document $document, Document $proje $queueForUsage->addMetric("collections", $value); // per project break; case $document->getCollection() === 'documents': - $queueForUsage->addMetric("{$document['databaseId']}" . "." . "{$document['collectionId']}" . ".documents", $value); // per collection - $queueForUsage->addMetric("{$document['databaseId']}" . ".documents", $value); // per database - $queueForUsage->addMetric("documents", $value); // per project + $queueForUsage + ->addMetric("{$document['databaseId']}" . "." . "{$document['collectionId']}" . ".documents", $value) // per collection + ->addMetric("{$document['databaseId']}" . ".documents", $value) // per database + ->addMetric("documents", $value) // per project + ; break; case $document->getCollection() === 'buckets': $queueForUsage->addMetric("buckets", $value); // per project @@ -100,21 +112,33 @@ $databaseListener = function (string $event, Document $document, Document $proje $bucketFiles = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".files")); $projectFiles = $dbForProject->getDocument('stats', md5("_inf_files")); if (!$bucketFiles->isEmpty()) { - $dbForProject->decreaseDocumentAttribute('stats', $projectFiles->getId(), 'value', $bucketFiles['value']); + $dbForProject->decreaseDocumentAttribute( + 'stats', + $projectFiles->getId(), + 'value', + $bucketFiles['value'] + ); } // bucket Storage $bucketStorage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".files.storage")); $projectStorage = $dbForProject->getDocument('stats', md5("_inf_files.storage")); if (!$bucketStorage->isEmpty()) { - $dbForProject->decreaseDocumentAttribute('stats', $projectStorage->getId(), 'value', $bucketStorage['value']); + $dbForProject->decreaseDocumentAttribute( + 'stats', + $projectStorage->getId(), + 'value', + $bucketStorage['value'] + ); } } break; case str_starts_with($document->getCollection(), 'bucket_'): // files - $queueForUsage->addMetric("{$document['bucketId']}" . ".files", $value); // per bucket - $queueForUsage->addMetric("{$document['bucketId']}" . ".files.storage", $document->getAttribute('sizeOriginal') * $value); // per bucket - $queueForUsage->addMetric("files", $value); // per project - $queueForUsage->addMetric("files.storage", $document->getAttribute('sizeOriginal') * $value); // per project + $queueForUsage + ->addMetric("{$document['bucketId']}" . ".files", $value) // per bucket + ->addMetric("{$document['bucketId']}" . ".files.storage", $document->getAttribute('sizeOriginal') * $value)// per bucket + ->addMetric("files", $value) // per project + ->addMetric("files.storage", $document->getAttribute('sizeOriginal') * $value) // per project + ; break; case $document->getCollection() === 'functions': $queueForUsage->addMetric("functions", $value); // per project @@ -123,48 +147,74 @@ $databaseListener = function (string $event, Document $document, Document $proje $functionDeployments = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getId()}" . ".deployments")); $projectDeployments = $dbForProject->getDocument('stats', md5("_inf_deployments")); if (!$functionDeployments->isEmpty()) { - $dbForProject->decreaseDocumentAttribute('stats', $projectDeployments->getId(), 'value', $functionDeployments['value']); + $dbForProject->decreaseDocumentAttribute( + 'stats', + $projectDeployments->getId(), + 'value', + $functionDeployments['value'] + ); } // Deployments Storage $functionDeploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getId()}" . ".deployments.storage")); $projectDeploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function.deployments.storage")); if (!$functionDeployments->isEmpty()) { - $dbForProject->decreaseDocumentAttribute('stats', $projectDeploymentsStorage->getId(), 'value', $functionDeploymentsStorage['value']); + $dbForProject->decreaseDocumentAttribute( + 'stats', + $projectDeploymentsStorage->getId(), + 'value', + $functionDeploymentsStorage['value'] + ); } - //TODO needs to find a solution for builds + //TODO Missing solution for builds (functionId) // Executions $functionExecutions = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".executions")); $projectExecutions = $dbForProject->getDocument('stats', md5("_inf_executions")); if (!$functionExecutions->isEmpty()) { - $dbForProject->decreaseDocumentAttribute('stats', $projectExecutions->getId(), 'value', $functionExecutions['value']); + $dbForProject->decreaseDocumentAttribute( + 'stats', + $projectExecutions->getId(), + 'value', + $functionExecutions['value'] + ); } // Executions Compute $functionExecutionsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".executions.compute")); $projectExecutionsCompute = $dbForProject->getDocument('stats', md5("_inf_executions.compute")); if (!$functionExecutionsCompute->isEmpty()) { - $dbForProject->decreaseDocumentAttribute('stats', $projectExecutionsCompute->getId(), 'value', $functionExecutionsCompute['value']); + $dbForProject->decreaseDocumentAttribute( + 'stats', + $projectExecutionsCompute->getId(), + 'value', + $functionExecutionsCompute['value'] + ); } } break; case $document->getCollection() === 'deployments': - $queueForUsage->addMetric("{$document['resourceType']}" . "." . "{$document['resourceId']}" . ".deployments", $value); // per function - $queueForUsage->addMetric("{$document['resourceType']}" . "." . "{$document['resourceId']}" . ".deployments.storage", $document->getAttribute('size') * $value); // per function - $queueForUsage->addMetric("deployments", $value); // per project - $queueForUsage->addMetric("deployments.storage", $document->getAttribute('size') * $value); // per project + $queueForUsage + ->addMetric("{$document['resourceType']}" . "." . "{$document['resourceId']}" . ".deployments", $value)// per function + ->addMetric("{$document['resourceType']}" . "." . "{$document['resourceId']}" . ".deployments.storage", $document->getAttribute('size') * $value) // per function + ->addMetric("deployments", $value) // per project + ->addMetric("deployments.storage", $document->getAttribute('size') * $value) // per project + ; break; - case $document->getCollection() === 'builds': // needs to extract functionId - $queueForUsage->addMetric("{$document['functionId']}" . ".builds", $value); // per function - $queueForUsage->addMetric("{$document['functionId']}" . ".builds.storage", $document->getAttribute('size') * $value); // per function - $queueForUsage->addMetric("builds", $value); // per project - $queueForUsage->addMetric("builds.storage", $document->getAttribute('size') * $value); // per project + case $document->getCollection() === 'builds': // todo needs to extract functionId + $queueForUsage + ->addMetric("{$document['functionId']}" . ".builds", $value) // per function + ->addMetric("{$document['functionId']}" . ".builds.storage", $document->getAttribute('size') * $value) // per function + ->addMetric("builds", $value) // per project + ->addMetric("builds.storage", $document->getAttribute('size') * $value) // per project + ; break; case $document->getCollection() === 'executions': - $queueForUsage->addMetric("{$document['functionId']}" . ".executions", $value); // per function - $queueForUsage->addMetric("{$document['functionId']}" . ".executions.compute", $document->getAttribute('duration') * $value); // per function - $queueForUsage->addMetric("executions", $value); // per project - $queueForUsage->addMetric("executions.compute", $document->getAttribute('duration') * $value); // per project + $queueForUsage + ->addMetric("{$document['functionId']}" . ".executions", $value) // per function + ->addMetric("{$document['functionId']}" . ".executions.compute", $document->getAttribute('duration') * $value) // per function + ->addMetric("executions", $value) // per project + ->addMetric("executions.compute", $document->getAttribute('duration') * $value) // per project + ; break; default: break; diff --git a/app/workers/usage.php b/app/workers/usage.php index f48cac9a6..2b0c6f80c 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -78,12 +78,16 @@ $server 'time' => $time, 'metric' => $metric['key'], 'value' => $metric['value'], - 'type' => 0, 'region' => App::getEnv('_APP_REGION', 'default'), ])); } else { //console::info("{$document->getAttribute('period')}, {$document->getAttribute('time')}, {$document->getAttribute('metric')} = {$value}"); - $adapter->decreaseDocumentAttribute('stats', $document->getId(), 'value', $metric['value']); + $adapter->decreaseDocumentAttribute( + 'stats', + $document->getId(), + 'value', + $metric['value'] + ); } } catch (\Exception $e) { console::error($e->getMessage()); From ba04f845da3ef798b50b5630ab1dee7997014dd0 Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 11 Dec 2022 11:00:00 +0200 Subject: [PATCH 14/94] databases usage --- app/controllers/api/databases.php | 457 +++++++----------- app/controllers/api/project.php | 140 +++--- app/controllers/shared/api.php | 22 +- composer.lock | 23 +- .../Utopia/Response/Model/UsageCollection.php | 28 -- .../Utopia/Response/Model/UsageDatabase.php | 60 +-- .../Utopia/Response/Model/UsageDatabases.php | 88 +--- .../Utopia/Response/Model/UsageProject.php | 7 - 8 files changed, 264 insertions(+), 561 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index b3e8196cc..c428943c5 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -2386,124 +2386,6 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu $response->noContent(); }); -App::get('/v1/databases/usage') - ->desc('Get usage stats for the database') - ->groups(['api', 'database']) - ->label('scope', 'collections.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'getUsage') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USAGE_DATABASES) - ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), '`Date range.', true) - ->inject('response') - ->inject('dbForProject') - ->action(function (string $range, Response $response, Database $dbForProject) { - - // $usage = []; - // if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { - // $periods = [ - // '24h' => [ - // 'period' => '1h', - // 'limit' => 24, - // ], - // '7d' => [ - // 'period' => '1d', - // 'limit' => 7, - // ], - // '30d' => [ - // 'period' => '1d', - // 'limit' => 30, - // ], - // '90d' => [ - // 'period' => '1d', - // 'limit' => 90, - // ], - // ]; - - // $metrics = [ - // 'databases.$all.count.total', - // 'documents.$all.count.total', - // 'collections.$all.count.total', - // 'databases.$all.requests.create', - // 'databases.$all.requests.read', - // 'databases.$all.requests.update', - // 'databases.$all.requests.delete', - // 'collections.$all.requests.create', - // 'collections.$all.requests.read', - // 'collections.$all.requests.update', - // 'collections.$all.requests.delete', - // 'documents.$all.requests.create', - // 'documents.$all.requests.read', - // 'documents.$all.requests.update', - // 'documents.$all.requests.delete' - // ]; - - // $stats = []; - - // Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - // foreach ($metrics as $metric) { - // $limit = $periods[$range]['limit']; - // $period = $periods[$range]['period']; - - // $requestDocs = $dbForProject->find('stats', [ - // Query::equal('period', [$period]), - // Query::equal('metric', [$metric]), - // Query::limit($limit), - // Query::orderDesc('time'), - // ]); - - // $stats[$metric] = []; - // foreach ($requestDocs as $requestDoc) { - // $stats[$metric][] = [ - // 'value' => $requestDoc->getAttribute('value'), - // 'date' => $requestDoc->getAttribute('time'), - // ]; - // } - - // // backfill metrics with empty values for graphs - // $backfill = $limit - \count($requestDocs); - // while ($backfill > 0) { - // $last = $limit - $backfill - 1; // array index of last added metric - // $diff = match ($period) { // convert period to seconds for unix timestamp math - // '1h' => 3600, - // '1d' => 86400, - // }; - // $stats[$metric][] = [ - // 'value' => 0, - // 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), - // ]; - // $backfill--; - // } - // // Added 3'rd level to Index [period, metric, time] because of order by. - // $stats[$metric] = array_reverse($stats[$metric]); - // } - // }); - - // $usage = new Document([ - // 'range' => $range, - // 'databasesCount' => $stats['databases.$all.count.total'] ?? [], - // 'documentsCount' => $stats['documents.$all.count.total'] ?? [], - // 'collectionsCount' => $stats['collections.$all.count.total'] ?? [], - // 'documentsCreate' => $stats['documents.$all.requests.create'] ?? [], - // 'documentsRead' => $stats['documents.$all.requests.read'] ?? [], - // 'documentsUpdate' => $stats['documents.$all.requests.update'] ?? [], - // 'documentsDelete' => $stats['documents.$all.requests.delete'] ?? [], - // 'collectionsCreate' => $stats['collections.$all.requests.create'] ?? [], - // 'collectionsRead' => $stats['collections.$all.requests.read'] ?? [], - // 'collectionsUpdate' => $stats['collections.$all.requests.update'] ?? [], - // 'collectionsDelete' => $stats['collections.$all.requests.delete'] ?? [], - // 'databasesCreate' => $stats['databases.$all.requests.create'] ?? [], - // 'databasesRead' => $stats['databases.$all.requests.read'] ?? [], - // 'databasesUpdate' => $stats['databases.$all.requests.update'] ?? [], - // 'databasesDelete' => $stats['databases.$all.requests.delete'] ?? [], - // ]); - // } - - // $response->dynamic($usage, Response::MODEL_USAGE_DATABASES); - }); - App::get('/v1/databases/:databaseId/usage') ->desc('Get usage stats for the database') ->groups(['api', 'database']) @@ -2520,97 +2402,63 @@ App::get('/v1/databases/:databaseId/usage') ->inject('dbForProject') ->action(function (string $databaseId, string $range, Response $response, Database $dbForProject) { - // $usage = []; - // if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { - // $periods = [ - // '24h' => [ - // 'period' => '1h', - // 'limit' => 24, - // ], - // '7d' => [ - // 'period' => '1d', - // 'limit' => 7, - // ], - // '30d' => [ - // 'period' => '1d', - // 'limit' => 30, - // ], - // '90d' => [ - // 'period' => '1d', - // 'limit' => 90, - // ], - // ]; + $database = $dbForProject->getDocument('databases', $databaseId); - // $metrics = [ - // 'collections.' . $databaseId . '.count.total', - // 'collections.' . $databaseId . '.requests.create', - // 'collections.' . $databaseId . '.requests.read', - // 'collections.' . $databaseId . '.requests.update', - // 'collections.' . $databaseId . '.requests.delete', - // 'documents.' . $databaseId . '.count.total', - // 'documents.' . $databaseId . '.requests.create', - // 'documents.' . $databaseId . '.requests.read', - // 'documents.' . $databaseId . '.requests.update', - // 'documents.' . $databaseId . '.requests.delete' - // ]; + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } - // $stats = []; + $periods = Config::getParam('usage', []); + $stats = $usage = []; + $days = $periods[$range]; + $metrics = [ + $database->getId() . '.collections', + $database->getId() . '.documents', + ]; - // Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - // foreach ($metrics as $metric) { - // $limit = $periods[$range]['limit']; - // $period = $periods[$range]['period']; + Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $days['limit']; + $period = $days['period']; + $results = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + $stats[$metric] = []; + foreach ($results as $result) { + $stats[$metric][$result->getAttribute('time')] = [ + 'value' => $result->getAttribute('value'), + ]; + } + } + }); - // $requestDocs = $dbForProject->find('stats', [ - // Query::equal('period', [$period]), - // Query::equal('metric', [$metric]), - // Query::limit($limit), - // Query::orderDesc('time'), - // ]); + $format = match ($days['period']) { + '1h' => 'Y-m-d\TH:00:00.000P', + '1d' => 'Y-m-d\T00:00:00.000P', + }; - // $stats[$metric] = []; - // foreach ($requestDocs as $requestDoc) { - // $stats[$metric][] = [ - // 'value' => $requestDoc->getAttribute('value'), - // 'date' => $requestDoc->getAttribute('time'), - // ]; - // } + foreach ($metrics as $metric) { + $usage[$metric] = []; + $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { + $leap += $days['factor']; + $formatDate = date($format, $leap); + $usage[$metric][] = [ + 'value' => $stats[$metric][$formatDate]['value'] ?? 0, + 'date' => $formatDate, + ]; + } + $usage[$metric] = array_reverse($usage[$metric]); + } - // // backfill metrics with empty values for graphs - // $backfill = $limit - \count($requestDocs); - // while ($backfill > 0) { - // $last = $limit - $backfill - 1; // array index of last added metric - // $diff = match ($period) { // convert period to seconds for unix timestamp math - // '1h' => 3600, - // '1d' => 86400, - // }; - // $stats[$metric][] = [ - // 'value' => 0, - // 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), - // ]; - // $backfill--; - // } - // // TODO@kodumbeats explore performance if query is ordered by time ASC - // $stats[$metric] = array_reverse($stats[$metric]); - // } - // }); - - // $usage = new Document([ - // 'range' => $range, - // 'collectionsCount' => $stats["collections.{$databaseId}.count.total"] ?? [], - // 'collectionsCreate' => $stats["collections.{$databaseId}.requests.create"] ?? [], - // 'collectionsRead' => $stats["collections.{$databaseId}.requests.read"] ?? [], - // 'collectionsUpdate' => $stats["collections.{$databaseId}.requests.update"] ?? [], - // 'collectionsDelete' => $stats["collections.{$databaseId}.requests.delete"] ?? [], - // 'documentsCount' => $stats["documents.{$databaseId}.count.total"] ?? [], - // 'documentsCreate' => $stats["documents.{$databaseId}.requests.create"] ?? [], - // 'documentsRead' => $stats["documents.{$databaseId}.requests.read"] ?? [], - // 'documentsUpdate' => $stats["documents.{$databaseId}.requests.update"] ?? [], - // 'documentsDelete' => $stats["documents.{$databaseId}.requests.delete"] ?? [], - // ]); - // } - - // $response->dynamic($usage, Response::MODEL_USAGE_DATABASE); + $response->dynamic(new Document([ + 'range' => $range, + 'collectionsCount' => $usage[$metrics[0]], + 'documentsCount' => $usage[$metrics[1]], + ]), Response::MODEL_USAGE_DATABASE); }); App::get('/v1/databases/:databaseId/collections/:collectionId/usage') @@ -2631,93 +2479,132 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage') ->inject('dbForProject') ->action(function (string $databaseId, string $range, string $collectionId, Response $response, Database $dbForProject) { - // $database = $dbForProject->getDocument('databases', $databaseId); + $database = $dbForProject->getDocument('databases', $databaseId); - // $collectionDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); - // $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collectionDocument->getInternalId()); + $collectionDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collectionDocument->getInternalId()); - // if ($collection->isEmpty()) { - // throw new Exception(Exception::COLLECTION_NOT_FOUND); - // } + if ($collection->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } - // $usage = []; - // if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { - // $periods = [ - // '24h' => [ - // 'period' => '1h', - // 'limit' => 24, - // ], - // '7d' => [ - // 'period' => '1d', - // 'limit' => 7, - // ], - // '30d' => [ - // 'period' => '1d', - // 'limit' => 30, - // ], - // '90d' => [ - // 'period' => '1d', - // 'limit' => 90, - // ], - // ]; + $periods = Config::getParam('usage', []); + $stats = $usage = []; + $days = $periods[$range]; + $metrics = [ + $collection->getId() . '.documents', + ]; - // $metrics = [ - // "documents.{$databaseId}/{$collectionId}.count.total", - // "documents.{$databaseId}/{$collectionId}.requests.create", - // "documents.{$databaseId}/{$collectionId}.requests.read", - // "documents.{$databaseId}/{$collectionId}.requests.update", - // "documents.{$databaseId}/{$collectionId}.requests.delete", - // ]; + Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $days['limit']; + $period = $days['period']; + $results = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + $stats[$metric] = []; + foreach ($results as $result) { + $stats[$metric][$result->getAttribute('time')] = [ + 'value' => $result->getAttribute('value'), + ]; + } + } + }); - // $stats = []; + $format = match ($days['period']) { + '1h' => 'Y-m-d\TH:00:00.000P', + '1d' => 'Y-m-d\T00:00:00.000P', + }; - // Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - // foreach ($metrics as $metric) { - // $limit = $periods[$range]['limit']; - // $period = $periods[$range]['period']; + foreach ($metrics as $metric) { + $usage[$metric] = []; + $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { + $leap += $days['factor']; + $formatDate = date($format, $leap); + $usage[$metric][] = [ + 'value' => $stats[$metric][$formatDate]['value'] ?? 0, + 'date' => $formatDate, + ]; + } + $usage[$metric] = array_reverse($usage[$metric]); + } - // $requestDocs = $dbForProject->find('stats', [ - // Query::equal('period', [$period]), - // Query::equal('metric', [$metric]), - // Query::limit($limit), - // Query::orderDesc('time'), - // ]); - - // $stats[$metric] = []; - // foreach ($requestDocs as $requestDoc) { - // $stats[$metric][] = [ - // 'value' => $requestDoc->getAttribute('value'), - // 'date' => $requestDoc->getAttribute('time'), - // ]; - // } - - // // backfill metrics with empty values for graphs - // $backfill = $limit - \count($requestDocs); - // while ($backfill > 0) { - // $last = $limit - $backfill - 1; // array index of last added metric - // $diff = match ($period) { // convert period to seconds for unix timestamp math - // '1h' => 3600, - // '1d' => 86400, - // }; - // $stats[$metric][] = [ - // 'value' => 0, - // 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), - // ]; - // $backfill--; - // } - // $stats[$metric] = array_reverse($stats[$metric]); - // } - // }); - - // $usage = new Document([ - // 'range' => $range, - // 'documentsCount' => $stats["documents.{$databaseId}/{$collectionId}.count.total"] ?? [], - // 'documentsCreate' => $stats["documents.{$databaseId}/{$collectionId}.requests.create"] ?? [], - // 'documentsRead' => $stats["documents.{$databaseId}/{$collectionId}.requests.read"] ?? [], - // 'documentsUpdate' => $stats["documents.{$databaseId}/{$collectionId}.requests.update"] ?? [], - // 'documentsDelete' => $stats["documents.{$databaseId}/{$collectionId}.requests.delete" ?? []] - // ]); - // } - - // $response->dynamic($usage, Response::MODEL_USAGE_COLLECTION); + $response->dynamic(new Document([ + 'range' => $range, + 'documentsCount' => $usage[$metrics[0]], + ]), Response::MODEL_USAGE_COLLECTION); + }); + +App::get('/v1/databases/usage') + ->desc('Get usage stats for the database') + ->groups(['api', 'database']) + ->label('scope', 'collections.read') + ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) + ->label('sdk.namespace', 'databases') + ->label('sdk.method', 'getUsage') + ->label('sdk.response.code', Response::STATUS_CODE_OK) + ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) + ->label('sdk.response.model', Response::MODEL_USAGE_DATABASES) + ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), '`Date range.', true) + ->inject('response') + ->inject('dbForProject') + ->action(function (string $range, Response $response, Database $dbForProject) { + + $periods = Config::getParam('usage', []); + $stats = $usage = []; + $days = $periods[$range]; + $metrics = [ + 'databases', + 'collections', + 'documents', + ]; + + Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $days['limit']; + $period = $days['period']; + $results = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + $stats[$metric] = []; + foreach ($results as $result) { + $stats[$metric][$result->getAttribute('time')] = [ + 'value' => $result->getAttribute('value'), + ]; + } + } + }); + + $format = match ($days['period']) { + '1h' => 'Y-m-d\TH:00:00.000P', + '1d' => 'Y-m-d\T00:00:00.000P', + }; + + foreach ($metrics as $metric) { + $usage[$metric] = []; + $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { + $leap += $days['factor']; + $formatDate = date($format, $leap); + $usage[$metric][] = [ + 'value' => $stats[$metric][$formatDate]['value'] ?? 0, + 'date' => $formatDate, + ]; + } + $usage[$metric] = array_reverse($usage[$metric]); + } + + $response->dynamic(new Document([ + 'range' => $range, + 'databasesCount' => $usage[$metrics[0]], + 'collectionsCount' => $usage[$metrics[1]], + 'documentsCount' => $usage[$metrics[2]], + ]), Response::MODEL_USAGE_DATABASES); }); diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index 6e5b07c64..5665780b9 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -2,6 +2,7 @@ use Appwrite\Utopia\Response; use Utopia\App; +use Utopia\Config\Config; use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; @@ -23,90 +24,67 @@ App::get('/v1/project/usage') ->inject('response') ->inject('dbForProject') ->action(function (string $range, Response $response, Database $dbForProject) { - // $usage = []; - // if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { - // $periods = [ - // '24h' => [ - // 'period' => '1h', - // 'limit' => 24, - // ], - // '7d' => [ - // 'period' => '1d', - // 'limit' => 7, - // ], - // '30d' => [ - // 'period' => '1d', - // 'limit' => 30, - // ], - // '90d' => [ - // 'period' => '1d', - // 'limit' => 90, - // ], - // ]; - // $metrics = [ - // 'project.$all.network.requests', - // 'project.$all.network.bandwidth', - // 'project.$all.storage.size', - // 'users.$all.count.total', - // 'databases.$all.count.total', - // 'documents.$all.count.total', - // 'executions.$all.compute.total', - // 'buckets.$all.count.total' - // ]; + $periods = Config::getParam('usage', []); + $stats = $usage = []; + $days = $periods[$range]; + $metrics = [ + 'network.inbound', + 'network.outbound', + 'executions', + 'documents', + 'databases', + 'users', + 'files.storage', + 'buckets', + ]; - // $stats = []; + Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $days['limit']; + $period = $days['period']; + $results = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + $stats[$metric] = []; + foreach ($results as $result) { + $stats[$metric][$result->getAttribute('time')] = [ + 'value' => $result->getAttribute('value'), + ]; + } + } + }); - // Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - // foreach ($metrics as $metric) { - // $limit = $periods[$range]['limit']; - // $period = $periods[$range]['period']; + $format = match ($days['period']) { + '1h' => 'Y-m-d\TH:00:00.000P', + '1d' => 'Y-m-d\T00:00:00.000P', + }; - // $requestDocs = $dbForProject->find('stats', [ - // Query::equal('period', [$period]), - // Query::equal('metric', [$metric]), - // Query::limit($limit), - // Query::orderDesc('time'), - // ]); + foreach ($metrics as $metric) { + $usage[$metric] = []; + $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { + $leap += $days['factor']; + $formatDate = date($format, $leap); + $usage[$metric][] = [ + 'value' => $stats[$metric][$formatDate]['value'] ?? 0, + 'date' => $formatDate, + ]; + } + $usage[$metric] = array_reverse($usage[$metric]); + } - // $stats[$metric] = []; - // foreach ($requestDocs as $requestDoc) { - // $stats[$metric][] = [ - // 'value' => $requestDoc->getAttribute('value'), - // 'date' => $requestDoc->getAttribute('time'), - // ]; - // } - - // // backfill metrics with empty values for graphs - // $backfill = $limit - \count($requestDocs); - // while ($backfill > 0) { - // $last = $limit - $backfill - 1; // array index of last added metric - // $diff = match ($period) { // convert period to seconds for unix timestamp math - // '1h' => 3600, - // '1d' => 86400, - // }; - // $stats[$metric][] = [ - // 'value' => 0, - // 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), - // ]; - // $backfill--; - // } - // $stats[$metric] = array_reverse($stats[$metric]); - // } - // }); - - // $usage = new Document([ - // 'range' => $range, - // 'requests' => $stats[$metrics[0]] ?? [], - // 'network' => $stats[$metrics[1]] ?? [], - // 'storage' => $stats[$metrics[2]] ?? [], - // 'users' => $stats[$metrics[3]] ?? [], - // 'databases' => $stats[$metrics[4]] ?? [], - // 'documents' => $stats[$metrics[5]] ?? [], - // 'executions' => $stats[$metrics[6]] ?? [], - // 'buckets' => $stats[$metrics[7]] ?? [], - // ]); - // } - - // $response->dynamic($usage, Response::MODEL_USAGE_PROJECT); + $response->dynamic(new Document([ + 'range' => $range, + 'network' => ($usage[$metrics[0]] + $usage[$metrics[1]]), + 'executions' => $usage[$metrics[2]], + 'documents' => $usage[$metrics[3]], + 'databases' => $usage[$metrics[4]], + 'users' => $usage[$metrics[5]], + 'storage' => $usage[$metrics[6]], + 'buckets' => $usage[$metrics[8]], + ]), Response::MODEL_USAGE_PROJECT); }); diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 01720b5d8..3697dddb5 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -57,12 +57,12 @@ $databaseListener = function (string $event, Document $document, Document $proje var_dump($document->getCollection()); switch (true) { - case $document->getCollection() === 'users': - $queueForUsage->addMetric("users", $value); // per project - break; case $document->getCollection() === 'teams': $queueForUsage->addMetric("teams", $value); // per project break; + case $document->getCollection() === 'users': + $queueForUsage->addMetric("users", $value); // per project + break; case $document->getCollection() === 'sessions': $queueForUsage->addMetric("sessions", $value); // per project break; @@ -80,7 +80,6 @@ $databaseListener = function (string $event, Document $document, Document $proje $dbCollections['value'] ); } - // Documents $dbDocuments = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".documents")); $projectDocuments = $dbForProject->getDocument('stats', md5("_inf_documents")); @@ -97,11 +96,24 @@ $databaseListener = function (string $event, Document $document, Document $proje case str_starts_with($document->getCollection(), 'database_'): // collections $queueForUsage->addMetric("{$document['databaseId']}" . ".collections", $value); // per database $queueForUsage->addMetric("collections", $value); // per project + if ($event === Database::EVENT_DOCUMENT_DELETE) { + // Documents + $dbDocuments = $dbForProject->getDocument('stats', md5("_inf_" . "{$document['databaseId']}" . ".documents")); + $projectDocuments = $dbForProject->getDocument('stats', md5("_inf_documents")); + if (!$dbDocuments->isEmpty()) { + $dbForProject->decreaseDocumentAttribute( + 'stats', + $projectDocuments->getId(), + 'value', + $dbDocuments['value'] + ); + } + } break; case $document->getCollection() === 'documents': $queueForUsage - ->addMetric("{$document['databaseId']}" . "." . "{$document['collectionId']}" . ".documents", $value) // per collection ->addMetric("{$document['databaseId']}" . ".documents", $value) // per database + ->addMetric("{$document['databaseId']}" . "." . "{$document['collectionId']}" . ".documents", $value) // per collection ->addMetric("documents", $value) // per project ; break; diff --git a/composer.lock b/composer.lock index f741341ef..8e1ff6f8b 100644 --- a/composer.lock +++ b/composer.lock @@ -3315,16 +3315,16 @@ }, { "name": "matthiasmullie/minify", - "version": "1.3.69", + "version": "1.3.70", "source": { "type": "git", "url": "https://github.com/matthiasmullie/minify.git", - "reference": "a61c949cccd086808063611ef9698eabe42ef22f" + "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/a61c949cccd086808063611ef9698eabe42ef22f", - "reference": "a61c949cccd086808063611ef9698eabe42ef22f", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/2807d9f9bece6877577ad44acb5c801bb3ae536b", + "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b", "shasum": "" }, "require": { @@ -3333,9 +3333,10 @@ "php": ">=5.3.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "~2.0", - "matthiasmullie/scrapbook": "dev-master", - "phpunit/phpunit": ">=4.8" + "friendsofphp/php-cs-fixer": ">=2.0", + "matthiasmullie/scrapbook": ">=1.3", + "phpunit/phpunit": ">=4.8", + "squizlabs/php_codesniffer": ">=3.0" }, "suggest": { "psr/cache-implementation": "Cache implementation to use with Minify::cache" @@ -3358,12 +3359,12 @@ { "name": "Matthias Mullie", "email": "minify@mullie.eu", - "homepage": "http://www.mullie.eu", + "homepage": "https://www.mullie.eu", "role": "Developer" } ], "description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.", - "homepage": "http://www.minifier.org", + "homepage": "https://github.com/matthiasmullie/minify", "keywords": [ "JS", "css", @@ -3373,7 +3374,7 @@ ], "support": { "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.69" + "source": "https://github.com/matthiasmullie/minify/tree/1.3.70" }, "funding": [ { @@ -3381,7 +3382,7 @@ "type": "github" } ], - "time": "2022-08-01T09:00:18+00:00" + "time": "2022-12-09T12:56:44+00:00" }, { "name": "matthiasmullie/path-converter", diff --git a/src/Appwrite/Utopia/Response/Model/UsageCollection.php b/src/Appwrite/Utopia/Response/Model/UsageCollection.php index 8b6966fcd..1f60076d0 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageCollection.php +++ b/src/Appwrite/Utopia/Response/Model/UsageCollection.php @@ -23,34 +23,6 @@ class UsageCollection extends Model 'example' => [], 'array' => true ]) - ->addRule('documentsCreate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for documents created.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('documentsRead', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for documents read.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('documentsUpdate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for documents updated.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('documentsDelete', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for documents deleted.', - 'default' => [], - 'example' => [], - 'array' => true - ]) ; } diff --git a/src/Appwrite/Utopia/Response/Model/UsageDatabase.php b/src/Appwrite/Utopia/Response/Model/UsageDatabase.php index 0c84d796b..7f3aab29a 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageDatabase.php +++ b/src/Appwrite/Utopia/Response/Model/UsageDatabase.php @@ -16,13 +16,6 @@ class UsageDatabase extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('documentsCount', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for total number of documents.', - 'default' => [], - 'example' => [], - 'array' => true - ]) ->addRule('collectionsCount', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of collections.', @@ -30,58 +23,9 @@ class UsageDatabase extends Model 'example' => [], 'array' => true ]) - ->addRule('documentsCreate', [ + ->addRule('documentsCount', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for documents created.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('documentsRead', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for documents read.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('documentsUpdate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for documents updated.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('documentsDelete', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for documents deleted.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('collectionsCreate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for collections created.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('collectionsRead', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for collections read.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('collectionsUpdate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for collections updated.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('collectionsDelete', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for collections delete.', + 'description' => 'Aggregated stats for total number of documents.', 'default' => [], 'example' => [], 'array' => true diff --git a/src/Appwrite/Utopia/Response/Model/UsageDatabases.php b/src/Appwrite/Utopia/Response/Model/UsageDatabases.php index 93488a47d..a37639c28 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageDatabases.php +++ b/src/Appwrite/Utopia/Response/Model/UsageDatabases.php @@ -23,13 +23,6 @@ class UsageDatabases extends Model 'example' => [], 'array' => true ]) - ->addRule('documentsCount', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for total number of documents.', - 'default' => [], - 'example' => [], - 'array' => true - ]) ->addRule('collectionsCount', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of collections.', @@ -37,86 +30,9 @@ class UsageDatabases extends Model 'example' => [], 'array' => true ]) - ->addRule('databasesCreate', [ + ->addRule('documentsCount', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for documents created.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('databasesRead', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for documents read.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('databasesUpdate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for documents updated.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('databasesDelete', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for total number of collections.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('documentsCreate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for documents created.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('documentsRead', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for documents read.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('documentsUpdate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for documents updated.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('documentsDelete', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for documents deleted.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('collectionsCreate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for collections created.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('collectionsRead', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for collections read.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('collectionsUpdate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for collections updated.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('collectionsDelete', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for collections delete.', + 'description' => 'Aggregated stats for total number of documents.', 'default' => [], 'example' => [], 'array' => true diff --git a/src/Appwrite/Utopia/Response/Model/UsageProject.php b/src/Appwrite/Utopia/Response/Model/UsageProject.php index e37bc5928..ae099785e 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageProject.php +++ b/src/Appwrite/Utopia/Response/Model/UsageProject.php @@ -16,13 +16,6 @@ class UsageProject extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('requests', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for number of requests.', - 'default' => [], - 'example' => [], - 'array' => true - ]) ->addRule('network', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for consumed bandwidth.', From 52c2cefdb586975193e7997cf0cecb0f942d4d6a Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 11 Dec 2022 11:06:19 +0200 Subject: [PATCH 15/94] users usage --- app/controllers/api/users.php | 132 +++++++----------- .../Utopia/Response/Model/UsageUsers.php | 45 +----- 2 files changed, 50 insertions(+), 127 deletions(-) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 89ea0be70..624eaca51 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -1080,96 +1080,60 @@ App::get('/v1/users/usage') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_USAGE_USERS) ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), 'Date range.', true) - ->param('provider', '', new WhiteList(\array_merge(['email', 'anonymous'], \array_map(fn ($value) => "oauth-" . $value, \array_keys(Config::getParam('providers', [])))), true), 'Provider Name.', true) ->inject('response') ->inject('dbForProject') ->inject('register') - ->action(function (string $range, string $provider, Response $response, Database $dbForProject) { + ->action(function (string $range, Response $response, Database $dbForProject) { - // $usage = []; - // if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { - // $periods = [ - // '24h' => [ - // 'period' => '1h', - // 'limit' => 24, - // ], - // '7d' => [ - // 'period' => '1d', - // 'limit' => 7, - // ], - // '30d' => [ - // 'period' => '1d', - // 'limit' => 30, - // ], - // '90d' => [ - // 'period' => '1d', - // 'limit' => 90, - // ], - // ]; + $periods = Config::getParam('usage', []); + $stats = $usage = []; + $days = $periods[$range]; + $metrics = [ + 'users', + 'sessions', + ]; - // $metrics = [ - // 'users.$all.count.total', - // 'users.$all.requests.create', - // 'users.$all.requests.read', - // 'users.$all.requests.update', - // 'users.$all.requests.delete', - // 'sessions.$all.requests.create', - // 'sessions.$all.requests.delete', - // "sessions.$provider.requests.create", - // ]; + Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $days['limit']; + $period = $days['period']; + $results = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + $stats[$metric] = []; + foreach ($results as $result) { + $stats[$metric][$result->getAttribute('time')] = [ + 'value' => $result->getAttribute('value'), + ]; + } + } + }); - // $stats = []; + $format = match ($days['period']) { + '1h' => 'Y-m-d\TH:00:00.000P', + '1d' => 'Y-m-d\T00:00:00.000P', + }; - // Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - // foreach ($metrics as $metric) { - // $limit = $periods[$range]['limit']; - // $period = $periods[$range]['period']; + foreach ($metrics as $metric) { + $usage[$metric] = []; + $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { + $leap += $days['factor']; + $formatDate = date($format, $leap); + $usage[$metric][] = [ + 'value' => $stats[$metric][$formatDate]['value'] ?? 0, + 'date' => $formatDate, + ]; + } + $usage[$metric] = array_reverse($usage[$metric]); + } - // $requestDocs = $dbForProject->find('stats', [ - // Query::equal('period', [$period]), - // Query::equal('metric', [$metric]), - // Query::limit($limit), - // Query::orderDesc('time'), - // ]); - - // $stats[$metric] = []; - // foreach ($requestDocs as $requestDoc) { - // $stats[$metric][] = [ - // 'value' => $requestDoc->getAttribute('value'), - // 'date' => $requestDoc->getAttribute('time'), - // ]; - // } - - // // backfill metrics with empty values for graphs - // $backfill = $limit - \count($requestDocs); - // while ($backfill > 0) { - // $last = $limit - $backfill - 1; // array index of last added metric - // $diff = match ($period) { // convert period to seconds for unix timestamp math - // '1h' => 3600, - // '1d' => 86400, - // }; - // $stats[$metric][] = [ - // 'value' => 0, - // 'date' => DateTime::formatTz(DateTime::addSeconds(new \DateTime($stats[$metric][$last]['date'] ?? null), -1 * $diff)), - // ]; - // $backfill--; - // } - // $stats[$metric] = array_reverse($stats[$metric]); - // } - // }); - - // $usage = new Document([ - // 'range' => $range, - // 'usersCount' => $stats['users.$all.count.total'] ?? [], - // 'usersCreate' => $stats['users.$all.requests.create'] ?? [], - // 'usersRead' => $stats['users.$all.requests.read'] ?? [], - // 'usersUpdate' => $stats['users.$all.requests.update'] ?? [], - // 'usersDelete' => $stats['users.$all.requests.delete'] ?? [], - // 'sessionsCreate' => $stats['sessions.$all.requests.create'] ?? [], - // 'sessionsProviderCreate' => $stats["sessions.$provider.requests.create"] ?? [], - // 'sessionsDelete' => $stats['sessions.$all.requests.delete' ?? []] - // ]); - // } - - // $response->dynamic($usage, Response::MODEL_USAGE_USERS); + $response->dynamic(new Document([ + 'range' => $range, + 'usersCount' => $usage[$metrics[0]], + 'sessionsCount' => $usage[$metrics[1]], + ]), Response::MODEL_USAGE_USERS); }); diff --git a/src/Appwrite/Utopia/Response/Model/UsageUsers.php b/src/Appwrite/Utopia/Response/Model/UsageUsers.php index 4c7b37d50..335cb351a 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageUsers.php +++ b/src/Appwrite/Utopia/Response/Model/UsageUsers.php @@ -23,55 +23,14 @@ class UsageUsers extends Model 'example' => [], 'array' => true ]) - ->addRule('usersCreate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for users created.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('usersRead', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for users read.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('usersUpdate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for users updated.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('usersDelete', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for users deleted.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('sessionsCreate', [ + + ->addRule('sessionsCount', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for sessions created.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('sessionsProviderCreate', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('sessionsDelete', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for sessions deleted.', - 'default' => [], - 'example' => [], - 'array' => true - ]) ; } From 0348472345406f72ffa75bf34849ed88b3207fd5 Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 11 Dec 2022 19:15:38 +0200 Subject: [PATCH 16/94] usage cleanup --- .env | 4 - CONTRIBUTING.md | 2 - Dockerfile | 6 +- app/cli.php | 23 - app/config/collections.php | 13 +- app/config/variables.php | 50 +- app/controllers/shared/api.php | 54 +- app/executor.php | 802 +++++++++++++++++++ app/views/install/compose.phtml | 91 +-- app/workers/builds.php | 16 - app/workers/functions.php | 15 - app/workers/usage.php | 18 +- bin/executor | 3 + bin/usage | 3 - composer.json | 1 - docker-compose.yml | 438 ++++------ docs/specs/overview.drawio.svg | 80 +- docs/tutorials/add-environment-variable.md | 2 +- docs/tutorials/multi-architecture-support.md | 2 - src/Appwrite/Platform/Tasks/Doctor.php | 20 - tests/resources/docker/docker-compose.yml | 96 +-- tests/unit/Docker/ComposeTest.php | 1 - 22 files changed, 1125 insertions(+), 615 deletions(-) create mode 100644 app/executor.php create mode 100644 bin/executor delete mode 100755 bin/usage diff --git a/.env b/.env index f042b1686..71d58e8e3 100644 --- a/.env +++ b/.env @@ -35,10 +35,6 @@ _APP_CONNECTIONS_STORAGE=local://localhost _APP_STORAGE_ANTIVIRUS=disabled _APP_STORAGE_ANTIVIRUS_HOST=clamav _APP_STORAGE_ANTIVIRUS_PORT=3310 -_APP_INFLUXDB_HOST=influxdb -_APP_INFLUXDB_PORT=8086 -_APP_STATSD_HOST=telegraf -_APP_STATSD_PORT=8125 _APP_SMTP_HOST=maildev _APP_SMTP_PORT=1025 _APP_SMTP_SECURE= diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 773206f23..23a661919 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -235,8 +235,6 @@ Appwrite stack is combined from a variety of open-source technologies and tools. - Redis - for managing cache and in-memory data (currently, we do not use Redis for persistent data) - MariaDB - for database storage and queries -- InfluxDB - for managing stats and time-series based data -- Statsd - for sending data over UDP protocol (using Telegraf) - ClamAV - for validating and scanning storage files - Imagemagick - for manipulating and managing image media files. - Webp - for better compression of images on supporting clients diff --git a/Dockerfile b/Dockerfile index f233107bd..0c9c6ef2c 100755 --- a/Dockerfile +++ b/Dockerfile @@ -208,10 +208,6 @@ ENV _APP_SERVER=swoole \ _APP_DB_USER=root \ _APP_DB_PASS=password \ _APP_DB_SCHEMA=appwrite \ - _APP_INFLUXDB_HOST=influxdb \ - _APP_INFLUXDB_PORT=8086 \ - _APP_STATSD_HOST=telegraf \ - _APP_STATSD_PORT=8125 \ _APP_FUNCTIONS_SIZE_LIMIT=30000000 \ _APP_FUNCTIONS_TIMEOUT=900 \ _APP_FUNCTIONS_CPUS=1 \ @@ -305,10 +301,10 @@ RUN mkdir -p /storage/uploads && \ RUN chmod +x /usr/local/bin/doctor && \ chmod +x /usr/local/bin/maintenance && \ chmod +x /usr/local/bin/volume-sync && \ - chmod +x /usr/local/bin/usage && \ chmod +x /usr/local/bin/install && \ chmod +x /usr/local/bin/migrate && \ chmod +x /usr/local/bin/realtime && \ + chmod +x /usr/local/bin/executor && \ chmod +x /usr/local/bin/schedule && \ chmod +x /usr/local/bin/sdks && \ chmod +x /usr/local/bin/specs && \ diff --git a/app/cli.php b/app/cli.php index bfe7bfcef..81fb1dff8 100644 --- a/app/cli.php +++ b/app/cli.php @@ -116,29 +116,6 @@ CLI::setResource('getProjectDB', function (Group $pools, Database $dbForConsole, return $getProjectDB; }, ['pools', 'dbForConsole', 'cache']); -CLI::setResource('influxdb', function (Registry $register) { - $client = $register->get('influxdb'); /** @var InfluxDB\Client $client */ - $attempts = 0; - $max = 10; - $sleep = 1; - - do { // check if telegraf database is ready - try { - $attempts++; - $database = $client->selectDB('telegraf'); - if (in_array('telegraf', $client->listDatabases())) { - break; // leave the do-while if successful - } - } catch (\Throwable $th) { - Console::warning("InfluxDB not ready. Retrying connection ({$attempts})..."); - if ($attempts >= $max) { - throw new \Exception('InfluxDB database not ready yet'); - } - sleep($sleep); - } - } while ($attempts < $max); - return $database; -}, ['register']); CLI::setResource('queueForFunctions', function (Group $pools) { return new Func($pools->get('queue')->pop()->getResource()); diff --git a/app/config/collections.php b/app/config/collections.php index 68d4c24ff..9f63830f7 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -61,7 +61,7 @@ $collections = [ ], ], ], - + 'collections' => [ '$collection' => ID::custom('databases'), '$id' => ID::custom('collections'), @@ -3149,17 +3149,6 @@ $collections = [ 'array' => false, 'filters' => [], ], - [ - '$id' => ID::custom('type'), - 'type' => Database::VAR_INTEGER, - 'format' => '', - 'size' => 1, - 'signed' => false, - 'required' => true, - 'default' => 0, // 0 -> count, 1 -> sum - 'array' => false, - 'filters' => [], - ], ], 'indexes' => [ [ diff --git a/app/config/variables.php b/app/config/variables.php index 85c7a04f2..f265af09b 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -143,7 +143,7 @@ return [ ], [ 'name' => '_APP_USAGE_STATS', - 'description' => 'This variable allows you to disable the collection and displaying of usage stats. This value is set to \'enabled\' by default, to disable the usage stats set the value to \'disabled\'. When disabled, it\'s recommended to turn off the Worker Usage, Influxdb and Telegraf containers for better resource usage.', + 'description' => 'This variable allows you to disable the collection and displaying of usage stats. This value is set to \'enabled\' by default, to disable the usage stats set the value to \'disabled\'. When disabled, it\'s recommended to turn off the Worker Usage container for better resource usage.', 'introduction' => '0.7.0', 'default' => 'enabled', 'required' => false, @@ -344,54 +344,6 @@ return [ // ] ], ], - [ - 'category' => 'InfluxDB', - 'description' => 'Appwrite uses an InfluxDB server for managing time-series data and server stats. The InfluxDB env vars are used to allow Appwrite server to connect to the InfluxDB container.', - 'variables' => [ - [ - 'name' => '_APP_INFLUXDB_HOST', - 'description' => 'InfluxDB server host name address. Default value is: \'influxdb\'.', - 'introduction' => '', - 'default' => 'influxdb', - 'required' => false, - 'question' => '', - 'filter' => '' - ], - [ - 'name' => '_APP_INFLUXDB_PORT', - 'description' => 'InfluxDB server TCP port. Default value is: \'8086\'.', - 'introduction' => '', - 'default' => '8086', - 'required' => false, - 'question' => '', - 'filter' => '' - ], - ], - ], - [ - 'category' => 'StatsD', - 'description' => 'Appwrite uses a StatsD server for aggregating and sending stats data over a fast UDP connection. The StatsD env vars are used to allow Appwrite server to connect to the StatsD container.', - 'variables' => [ - [ - 'name' => '_APP_STATSD_HOST', - 'description' => 'StatsD server host name address. Default value is: \'telegraf\'.', - 'introduction' => '', - 'default' => 'telegraf', - 'required' => false, - 'question' => '', - 'filter' => '' - ], - [ - 'name' => '_APP_STATSD_PORT', - 'description' => 'StatsD server TCP port. Default value is: \'8125\'.', - 'introduction' => '', - 'default' => '8125', - 'required' => false, - 'question' => '', - 'filter' => '' - ], - ], - ], [ 'category' => 'SMTP', 'description' => "Appwrite is using an SMTP server for emailing your projects users and server admins. The SMTP env vars are used to allow Appwrite server to connect to the SMTP container.\n\nIf running in production, it might be easier to use a 3rd party SMTP server as it might be a little more difficult to set up a production SMTP server that will not send all your emails into your user\'s SPAM folder.", diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 3697dddb5..243275197 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -48,13 +48,16 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar return $label; }; -$databaseListener = function (string $event, Document $document, Document $project, Usage $queueForUsage, Database $dbForProject) { +$databaseListener = function (string $event, array $args, Document $project, Usage $queueForUsage, Database $dbForProject) { $value = 1; + $document = $args['document']; + $collection = $args['collection']; + if ($event === Database::EVENT_DOCUMENT_DELETE) { $value = -1; } - var_dump($document->getCollection()); + //var_dump($document->getCollection()); switch (true) { case $document->getCollection() === 'teams': @@ -63,11 +66,12 @@ $databaseListener = function (string $event, Document $document, Document $proje case $document->getCollection() === 'users': $queueForUsage->addMetric("users", $value); // per project break; - case $document->getCollection() === 'sessions': + case $document->getCollection() === 'sessions': // Todo sessions count offset issue $queueForUsage->addMetric("sessions", $value); // per project break; case $document->getCollection() === 'databases': $queueForUsage->addMetric("databases", $value); // per project + if ($event === Database::EVENT_DOCUMENT_DELETE) { // Collections $dbCollections = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".collections")); @@ -93,9 +97,12 @@ $databaseListener = function (string $event, Document $document, Document $proje } } break; - case str_starts_with($document->getCollection(), 'database_'): // collections - $queueForUsage->addMetric("{$document['databaseId']}" . ".collections", $value); // per database - $queueForUsage->addMetric("collections", $value); // per project + case $document->getCollection() === 'database_' . $document['$internalId']: // collections + $queueForUsage + ->addMetric("collections", $value) // per project + ->addMetric("{$document['databaseId']}" . ".collections", $value) // per database + ; + if ($event === Database::EVENT_DOCUMENT_DELETE) { // Documents $dbDocuments = $dbForProject->getDocument('stats', md5("_inf_" . "{$document['databaseId']}" . ".documents")); @@ -110,15 +117,20 @@ $databaseListener = function (string $event, Document $document, Document $proje } } break; - case $document->getCollection() === 'documents': + + case str_starts_with($document->getCollection(), 'database_') && str_contains($document->getCollection(), '_collection_'): //documents + var_dump($collection); + var_dump($document); + $queueForUsage - ->addMetric("{$document['databaseId']}" . ".documents", $value) // per database - ->addMetric("{$document['databaseId']}" . "." . "{$document['collectionId']}" . ".documents", $value) // per collection ->addMetric("documents", $value) // per project + ->addMetric("{$document->getAttribute('$databaseId')}" . ".documents", $value) // per database + ->addMetric("{$document->getAttribute('$databaseId')}" . "." . "{$collection->getId()}" . ".documents", $value) // per collection ; break; case $document->getCollection() === 'buckets': $queueForUsage->addMetric("buckets", $value); // per project + if ($event === Database::EVENT_DOCUMENT_DELETE) { // bucket Files $bucketFiles = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".files")); @@ -144,16 +156,17 @@ $databaseListener = function (string $event, Document $document, Document $proje } } break; - case str_starts_with($document->getCollection(), 'bucket_'): // files + case $document->getCollection() === 'bucket_' . $document['$internalId']: // files $queueForUsage - ->addMetric("{$document['bucketId']}" . ".files", $value) // per bucket - ->addMetric("{$document['bucketId']}" . ".files.storage", $document->getAttribute('sizeOriginal') * $value)// per bucket ->addMetric("files", $value) // per project ->addMetric("files.storage", $document->getAttribute('sizeOriginal') * $value) // per project + ->addMetric("{$document['bucketId']}" . ".files", $value) // per bucket + ->addMetric("{$document['bucketId']}" . ".files.storage", $document->getAttribute('sizeOriginal') * $value)// per bucket ; break; case $document->getCollection() === 'functions': $queueForUsage->addMetric("functions", $value); // per project + if ($event === Database::EVENT_DOCUMENT_DELETE) { // Deployments Storage $functionDeployments = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getId()}" . ".deployments")); @@ -206,26 +219,26 @@ $databaseListener = function (string $event, Document $document, Document $proje break; case $document->getCollection() === 'deployments': $queueForUsage - ->addMetric("{$document['resourceType']}" . "." . "{$document['resourceId']}" . ".deployments", $value)// per function - ->addMetric("{$document['resourceType']}" . "." . "{$document['resourceId']}" . ".deployments.storage", $document->getAttribute('size') * $value) // per function ->addMetric("deployments", $value) // per project ->addMetric("deployments.storage", $document->getAttribute('size') * $value) // per project + ->addMetric("{$document['resourceType']}" . "." . "{$document['resourceId']}" . ".deployments", $value)// per function + ->addMetric("{$document['resourceType']}" . "." . "{$document['resourceId']}" . ".deployments.storage", $document->getAttribute('size') * $value) // per function ; break; case $document->getCollection() === 'builds': // todo needs to extract functionId $queueForUsage - ->addMetric("{$document['functionId']}" . ".builds", $value) // per function - ->addMetric("{$document['functionId']}" . ".builds.storage", $document->getAttribute('size') * $value) // per function ->addMetric("builds", $value) // per project ->addMetric("builds.storage", $document->getAttribute('size') * $value) // per project + ->addMetric("{$document['functionId']}" . ".builds", $value) // per function + ->addMetric("{$document['functionId']}" . ".builds.storage", $document->getAttribute('size') * $value) // per function ; break; case $document->getCollection() === 'executions': $queueForUsage - ->addMetric("{$document['functionId']}" . ".executions", $value) // per function - ->addMetric("{$document['functionId']}" . ".executions.compute", $document->getAttribute('duration') * $value) // per function ->addMetric("executions", $value) // per project ->addMetric("executions.compute", $document->getAttribute('duration') * $value) // per project + ->addMetric("{$document['functionId']}" . ".executions", $value) // per function + ->addMetric("{$document['functionId']}" . ".executions.compute", $document->getAttribute('duration') * $value) // per function ; break; default: @@ -338,8 +351,8 @@ App::init() $database->setProject($project); $dbForProject - ->on(Database::EVENT_DOCUMENT_CREATE, fn ($event, Document $document) => $databaseListener($event, $document, $project, $queueForUsage, $dbForProject)) - ->on(Database::EVENT_DOCUMENT_DELETE, fn ($event, Document $document) => $databaseListener($event, $document, $project, $queueForUsage, $dbForProject)) + ->on(Database::EVENT_DOCUMENT_CREATE, fn ($event, $args) => $databaseListener($event, $args, $project, $queueForUsage, $dbForProject)) + //->on(Database::EVENT_DOCUMENT_DELETE, fn ($event, Document $document, Document $collection) => $databaseListener($event, $document, $project, $queueForUsage, $dbForProject)) ; $useCache = $route->getLabel('cache', false); @@ -581,6 +594,7 @@ App::shutdown() $queueForUsage ->setProject($project) + ->addMetric('network.requests', 1) ->addMetric("network.inbound", $request->getSize() + $fileSize) ->addMetric("network.outbound", $response->getSize()) ->trigger(); diff --git a/app/executor.php b/app/executor.php new file mode 100644 index 000000000..fba8c4c41 --- /dev/null +++ b/app/executor.php @@ -0,0 +1,802 @@ +column('id', Swoole\Table::TYPE_STRING, 256); +$activeRuntimes->column('created', Swoole\Table::TYPE_INT, 8); +$activeRuntimes->column('updated', Swoole\Table::TYPE_INT, 8); +$activeRuntimes->column('name', Swoole\Table::TYPE_STRING, 128); +$activeRuntimes->column('status', Swoole\Table::TYPE_STRING, 128); +$activeRuntimes->column('key', Swoole\Table::TYPE_STRING, 256); +$activeRuntimes->create(); + +/** + * Create orchestration pool + */ +$orchestrationPool = new ConnectionPool(function () { + $dockerUser = App::getEnv('DOCKERHUB_PULL_USERNAME', null); + $dockerPass = App::getEnv('DOCKERHUB_PULL_PASSWORD', null); + $orchestration = new Orchestration(new DockerCLI($dockerUser, $dockerPass)); + return $orchestration; +}, 10); + + +/** + * Create logger instance + */ +$providerName = App::getEnv('_APP_LOGGING_PROVIDER', ''); +$providerConfig = App::getEnv('_APP_LOGGING_CONFIG', ''); +$logger = null; + +if (!empty($providerName) && !empty($providerConfig) && Logger::hasProvider($providerName)) { + $classname = '\\Utopia\\Logger\\Adapter\\' . \ucfirst($providerName); + $adapter = new $classname($providerConfig); + $logger = new Logger($adapter); +} + +function logError(Throwable $error, string $action, Utopia\Route $route = null) +{ + global $logger; + + if ($logger) { + $version = App::getEnv('_APP_VERSION', 'UNKNOWN'); + + $log = new Log(); + $log->setNamespace("executor"); + $log->setServer(\gethostname()); + $log->setVersion($version); + $log->setType(Log::TYPE_ERROR); + $log->setMessage($error->getMessage()); + + if ($route) { + $log->addTag('method', $route->getMethod()); + $log->addTag('url', $route->getPath()); + } + + $log->addTag('code', $error->getCode()); + $log->addTag('verboseType', get_class($error)); + + $log->addExtra('file', $error->getFile()); + $log->addExtra('line', $error->getLine()); + $log->addExtra('trace', $error->getTraceAsString()); + $log->addExtra('detailedTrace', $error->getTrace()); + + $log->setAction($action); + + $isProduction = App::getEnv('_APP_ENV', 'development') === 'production'; + $log->setEnvironment($isProduction ? Log::ENVIRONMENT_PRODUCTION : Log::ENVIRONMENT_STAGING); + + $responseCode = $logger->addLog($log); + Console::info('Executor log pushed with status code: ' . $responseCode); + } + + Console::error('[Error] Type: ' . get_class($error)); + Console::error('[Error] Message: ' . $error->getMessage()); + Console::error('[Error] File: ' . $error->getFile()); + Console::error('[Error] Line: ' . $error->getLine()); +} + +function getStorageDevice($root): Device +{ + switch (App::getEnv('_APP_STORAGE_DEVICE', Storage::DEVICE_LOCAL)) { + case Storage::DEVICE_LOCAL: + default: + return new Local($root); + case Storage::DEVICE_S3: + $s3AccessKey = App::getEnv('_APP_STORAGE_S3_ACCESS_KEY', ''); + $s3SecretKey = App::getEnv('_APP_STORAGE_S3_SECRET', ''); + $s3Region = App::getEnv('_APP_STORAGE_S3_REGION', ''); + $s3Bucket = App::getEnv('_APP_STORAGE_S3_BUCKET', ''); + $s3Acl = 'private'; + return new S3($root, $s3AccessKey, $s3SecretKey, $s3Bucket, $s3Region, $s3Acl); + case Storage::DEVICE_DO_SPACES: + $doSpacesAccessKey = App::getEnv('_APP_STORAGE_DO_SPACES_ACCESS_KEY', ''); + $doSpacesSecretKey = App::getEnv('_APP_STORAGE_DO_SPACES_SECRET', ''); + $doSpacesRegion = App::getEnv('_APP_STORAGE_DO_SPACES_REGION', ''); + $doSpacesBucket = App::getEnv('_APP_STORAGE_DO_SPACES_BUCKET', ''); + $doSpacesAcl = 'private'; + return new DOSpaces($root, $doSpacesAccessKey, $doSpacesSecretKey, $doSpacesBucket, $doSpacesRegion, $doSpacesAcl); + case Storage::DEVICE_BACKBLAZE: + $backblazeAccessKey = App::getEnv('_APP_STORAGE_BACKBLAZE_ACCESS_KEY', ''); + $backblazeSecretKey = App::getEnv('_APP_STORAGE_BACKBLAZE_SECRET', ''); + $backblazeRegion = App::getEnv('_APP_STORAGE_BACKBLAZE_REGION', ''); + $backblazeBucket = App::getEnv('_APP_STORAGE_BACKBLAZE_BUCKET', ''); + $backblazeAcl = 'private'; + return new Backblaze($root, $backblazeAccessKey, $backblazeSecretKey, $backblazeBucket, $backblazeRegion, $backblazeAcl); + case Storage::DEVICE_LINODE: + $linodeAccessKey = App::getEnv('_APP_STORAGE_LINODE_ACCESS_KEY', ''); + $linodeSecretKey = App::getEnv('_APP_STORAGE_LINODE_SECRET', ''); + $linodeRegion = App::getEnv('_APP_STORAGE_LINODE_REGION', ''); + $linodeBucket = App::getEnv('_APP_STORAGE_LINODE_BUCKET', ''); + $linodeAcl = 'private'; + return new Linode($root, $linodeAccessKey, $linodeSecretKey, $linodeBucket, $linodeRegion, $linodeAcl); + case Storage::DEVICE_WASABI: + $wasabiAccessKey = App::getEnv('_APP_STORAGE_WASABI_ACCESS_KEY', ''); + $wasabiSecretKey = App::getEnv('_APP_STORAGE_WASABI_SECRET', ''); + $wasabiRegion = App::getEnv('_APP_STORAGE_WASABI_REGION', ''); + $wasabiBucket = App::getEnv('_APP_STORAGE_WASABI_BUCKET', ''); + $wasabiAcl = 'private'; + return new Wasabi($root, $wasabiAccessKey, $wasabiSecretKey, $wasabiBucket, $wasabiRegion, $wasabiAcl); + } +} + +App::post('/v1/runtimes') + ->desc("Create a new runtime server") + ->param('runtimeId', '', new Text(64), 'Unique runtime ID.') + ->param('source', '', new Text(0), 'Path to source files.') + ->param('destination', '', new Text(0), 'Destination folder to store build files into.', true) + ->param('vars', [], new Assoc(), 'Environment Variables required for the build.') + ->param('commands', [], new ArrayList(new Text(1024), 100), 'Commands required to build the container. Maximum of 100 commands are allowed, each 1024 characters long.') + ->param('runtime', '', new Text(128), 'Runtime for the cloud function.') + ->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.') + ->param('workdir', '', new Text(256), 'Working directory.', true) + ->inject('orchestrationPool') + ->inject('activeRuntimes') + ->inject('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)) { + if ($activeRuntimes->get($runtimeId)['status'] == 'pending') { + throw new \Exception('A runtime with the same ID is already being created. Attempt a execution soon.', 500); + } + + throw new Exception('Runtime already exists.', 409); + } + + $container = []; + $containerId = ''; + $stdout = ''; + $stderr = ''; + $startTime = DateTime::now(); + $startTimeUnix = (new \DateTime($startTime))->getTimestamp(); + $endTimeUnix = 0; + $orchestration = $orchestrationPool->get(); + + $secret = \bin2hex(\random_bytes(16)); + + if (!$remove) { + $activeRuntimes->set($runtimeId, [ + 'id' => $containerId, + 'name' => $runtimeId, + 'created' => $startTimeUnix, + 'updated' => $endTimeUnix, + 'status' => 'pending', + 'key' => $secret, + ]); + } + + try { + Console::info('Building container : ' . $runtimeId); + + /** + * Temporary file paths in the executor + */ + $tmpSource = "/tmp/$runtimeId/src/code.tar.gz"; + $tmpBuild = "/tmp/$runtimeId/builds/code.tar.gz"; + + /** + * Copy code files from source to a temporary location on the executor + */ + $sourceDevice = getStorageDevice("/"); + $localDevice = new Local(); + $buffer = $sourceDevice->read($source); + if (!$localDevice->write($tmpSource, $buffer)) { + throw new Exception('Failed to copy source code to temporary directory', 500); + }; + + /** + * Create the mount folder + */ + if (!\file_exists(\dirname($tmpBuild))) { + if (!@\mkdir(\dirname($tmpBuild), 0755, true)) { + throw new Exception("Failed to create temporary directory", 500); + } + } + + /** + * Create container + */ + $vars = \array_merge($vars, [ + 'INTERNAL_RUNTIME_KEY' => $secret, + 'INTERNAL_RUNTIME_ENTRYPOINT' => $entrypoint, + ]); + $vars = array_map(fn ($v) => strval($v), $vars); + $orchestration + ->setCpus((int) App::getEnv('_APP_FUNCTIONS_CPUS', 0)) + ->setMemory((int) App::getEnv('_APP_FUNCTIONS_MEMORY', 0)) + ->setSwap((int) App::getEnv('_APP_FUNCTIONS_MEMORY_SWAP', 0)); + + /** Keep the container alive if we have commands to be executed */ + $entrypoint = !empty($commands) ? [ + 'tail', + '-f', + '/dev/null' + ] : []; + + $containerId = $orchestration->run( + image: $baseImage, + name: $runtimeId, + hostname: $runtimeId, + vars: $vars, + command: $entrypoint, + labels: [ + 'openruntimes-id' => $runtimeId, + 'openruntimes-type' => 'runtime', + 'openruntimes-created' => strval($startTimeUnix), + 'openruntimes-runtime' => $runtime, + ], + workdir: $workdir, + volumes: [ + \dirname($tmpSource) . ':/tmp:rw', + \dirname($tmpBuild) . ':/usr/code:rw' + ] + ); + + if (empty($containerId)) { + throw new Exception('Failed to create build container', 500); + } + + $orchestration->networkConnect($runtimeId, App::getEnv('OPEN_RUNTIMES_NETWORK', 'appwrite_runtimes')); + + /** + * Execute any commands if they were provided + */ + if (!empty($commands)) { + $status = $orchestration->execute( + name: $runtimeId, + command: $commands, + stdout: $stdout, + stderr: $stderr, + timeout: App::getEnv('_APP_FUNCTIONS_BUILD_TIMEOUT', 900) + ); + + if (!$status) { + throw new Exception('Failed to build dependenices ' . $stderr, 500); + } + } + + /** + * Move built code to expected build directory + */ + if (!empty($destination)) { + // Check if the build was successful by checking if file exists + if (!\file_exists($tmpBuild)) { + throw new Exception('Something went wrong during the build process', 500); + } + + $destinationDevice = getStorageDevice($destination); + $outputPath = $destinationDevice->getPath(\uniqid() . '.' . \pathinfo('code.tar.gz', PATHINFO_EXTENSION)); + + $buffer = $localDevice->read($tmpBuild); + if (!$destinationDevice->write($outputPath, $buffer, $localDevice->getFileMimeType($tmpBuild))) { + throw new Exception('Failed to move built code to storage', 500); + }; + + $container['outputPath'] = $outputPath; + } + + if (empty($stdout)) { + $stdout = 'Build Successful!'; + } + + $endTime = DateTime::now(); + $endTimeUnix = (new \DateTime($endTime))->getTimestamp(); + $duration = $endTimeUnix - $startTimeUnix; + + $container = array_merge($container, [ + 'status' => 'ready', + 'response' => \mb_strcut($stdout, 0, 1000000), // Limit to 1MB + 'stderr' => \mb_strcut($stderr, 0, 1000000), // Limit to 1MB + 'startTime' => $startTime, + 'endTime' => $endTime, + 'duration' => $duration, + ]); + + + if (!$remove) { + $activeRuntimes->set($runtimeId, [ + 'id' => $containerId, + 'name' => $runtimeId, + 'created' => $startTimeUnix, + 'updated' => $endTimeUnix, + 'status' => 'Up ' . \round($duration, 2) . 's', + 'key' => $secret, + ]); + } + + Console::success('Build Stage completed in ' . ($duration) . ' seconds'); + } catch (Throwable $th) { + Console::error('Build failed: ' . $th->getMessage() . $stdout); + + throw new Exception($th->getMessage() . $stdout, 500); + } finally { + // Container cleanup + if ($remove) { + if (!empty($containerId)) { + // If container properly created + $orchestration->remove($containerId, true); + $activeRuntimes->del($runtimeId); + } 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); + $activeRuntimes->del($runtimeId); + } 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); + } + + $response + ->setStatusCode(Response::STATUS_CODE_CREATED) + ->json($container); + }); + + +App::get('/v1/runtimes') + ->desc("List currently active runtimes") + ->inject('activeRuntimes') + ->inject('response') + ->action(function ($activeRuntimes, Response $response) { + $runtimes = []; + + foreach ($activeRuntimes as $runtime) { + $runtimes[] = $runtime; + } + + $response + ->setStatusCode(Response::STATUS_CODE_OK) + ->json($runtimes); + }); + +App::get('/v1/runtimes/:runtimeId') + ->desc("Get a runtime by its ID") + ->param('runtimeId', '', new Text(64), 'Runtime unique ID.') + ->inject('activeRuntimes') + ->inject('response') + ->action(function ($runtimeId, $activeRuntimes, Response $response) { + + if (!$activeRuntimes->exists($runtimeId)) { + throw new Exception('Runtime not found', 404); + } + + $runtime = $activeRuntimes->get($runtimeId); + + $response + ->setStatusCode(Response::STATUS_CODE_OK) + ->json($runtime); + }); + +App::delete('/v1/runtimes/:runtimeId') + ->desc('Delete a runtime') + ->param('runtimeId', '', new Text(64), 'Runtime unique ID.', false) + ->inject('orchestrationPool') + ->inject('activeRuntimes') + ->inject('response') + ->action(function (string $runtimeId, $orchestrationPool, $activeRuntimes, Response $response) { + + if (!$activeRuntimes->exists($runtimeId)) { + throw new Exception('Runtime not found', 404); + } + + Console::info('Deleting runtime: ' . $runtimeId); + + try { + $orchestration = $orchestrationPool->get(); + $orchestration->remove($runtimeId, true); + $activeRuntimes->del($runtimeId); + Console::success('Removed runtime container: ' . $runtimeId); + } finally { + $orchestrationPool->put($orchestration); + } + + // Remove all the build containers with that same ID + // TODO:: Delete build containers + // foreach ($buildIds as $buildId) { + // try { + // Console::info('Deleting build container : ' . $buildId); + // $status = $orchestration->remove('build-' . $buildId, true); + // } catch (Throwable $th) { + // Console::error($th->getMessage()); + // } + // } + + $response + ->setStatusCode(Response::STATUS_CODE_OK) + ->send(); + }); + + +App::post('/v1/execution') + ->desc('Create an execution') + ->param('runtimeId', '', new Text(64), 'The runtimeID to execute.') + ->param('vars', [], new Assoc(), 'Environment variables required for the build.') + ->param('data', '', new Text(8192), 'Data to be forwarded to the function, this is user specified.', true) + ->param('timeout', 15, new Range(1, (int) App::getEnv('_APP_FUNCTIONS_TIMEOUT', 900)), 'Function maximum execution time in seconds.') + ->inject('activeRuntimes') + ->inject('response') + ->action( + function (string $runtimeId, array $vars, string $data, $timeout, $activeRuntimes, Response $response) { + if (!$activeRuntimes->exists($runtimeId)) { + throw new Exception('Runtime not found. Please create the runtime.', 404); + } + + for ($i = 0; $i < 5; $i++) { + if ($activeRuntimes->get($runtimeId)['status'] === 'pending') { + Console::info('Waiting for runtime to be ready...'); + sleep(1); + } else { + break; + } + + if ($i === 4) { + throw new Exception('Runtime failed to launch in allocated time.', 500); + } + } + + $runtime = $activeRuntimes->get($runtimeId); + $secret = $runtime['key']; + if (empty($secret)) { + throw new Exception('Runtime secret not found. Please re-create the runtime.', 500); + } + + Console::info('Executing Runtime: ' . $runtimeId); + + $execution = []; + $executionStart = \microtime(true); + $stdout = ''; + $stderr = ''; + $res = ''; + $statusCode = 0; + $errNo = -1; + $executorResponse = ''; + + $timeout ??= (int) App::getEnv('_APP_FUNCTIONS_TIMEOUT', 900); + + $ch = \curl_init(); + $body = \json_encode([ + 'variables' => $vars, + 'payload' => $data, + 'timeout' => $timeout + ]); + \curl_setopt($ch, CURLOPT_URL, "http://" . $runtimeId . ":3000/"); + \curl_setopt($ch, CURLOPT_POST, true); + \curl_setopt($ch, CURLOPT_POSTFIELDS, $body); + \curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + \curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); + \curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); + + \curl_setopt($ch, CURLOPT_HTTPHEADER, [ + 'Content-Type: application/json', + 'Content-Length: ' . \strlen($body), + 'x-internal-challenge: ' . $secret, + 'host: null' + ]); + + $executorResponse = \curl_exec($ch); + $executorResponse = json_decode($executorResponse, true); + + $statusCode = \curl_getinfo($ch, CURLINFO_HTTP_CODE); + + $error = \curl_error($ch); + + $errNo = \curl_errno($ch); + + \curl_close($ch); + + switch (true) { + /** No Error. */ + case $errNo === 0: + break; + /** Runtime not ready for requests yet. 111 is the swoole error code for Connection Refused - see https://openswoole.com/docs/swoole-error-code */ + case $errNo === 111: + throw new Exception('An internal curl error has occurred within the executor! Error Msg: ' . $error, 406); + /** Any other CURL error */ + default: + throw new Exception('An internal curl error has occurred within the executor! Error Msg: ' . $error, 500); + } + + switch (true) { + case $statusCode >= 500: + $stderr = ($executorResponse ?? [])['stderr'] ?? 'Internal Runtime error.'; + $stdout = ($executorResponse ?? [])['stdout'] ?? 'Internal Runtime error.'; + break; + case $statusCode >= 100: + $stdout = $executorResponse['stdout']; + $res = $executorResponse['response']; + if (is_array($res)) { + $res = json_encode($res, JSON_UNESCAPED_UNICODE); + } + break; + default: + $stderr = ($executorResponse ?? [])['stderr'] ?? 'Execution failed.'; + $stdout = ($executorResponse ?? [])['stdout'] ?? ''; + break; + } + + $executionEnd = \microtime(true); + $executionTime = ($executionEnd - $executionStart); + $functionStatus = ($statusCode >= 500) ? 'failed' : 'completed'; + + Console::success('Function executed in ' . $executionTime . ' seconds, status: ' . $functionStatus); + + $execution = [ + 'status' => $functionStatus, + 'statusCode' => $statusCode, + 'response' => \mb_strcut($res, 0, 1000000), // Limit to 1MB + 'stdout' => \mb_strcut($stdout, 0, 1000000), // Limit to 1MB + 'stderr' => \mb_strcut($stderr, 0, 1000000), // Limit to 1MB + 'duration' => $executionTime, + ]; + + /** Update swoole table */ + $runtime['updated'] = \time(); + $activeRuntimes->set($runtimeId, $runtime); + + $response + ->setStatusCode(Response::STATUS_CODE_OK) + ->json($execution); + } + ); + +App::setMode(App::MODE_TYPE_PRODUCTION); // Define Mode + +$http = new Server("0.0.0.0", 80); + +/** Set Resources */ +App::setResource('orchestrationPool', fn() => $orchestrationPool); +App::setResource('activeRuntimes', fn() => $activeRuntimes); + +/** Set callbacks */ +App::error() + ->inject('utopia') + ->inject('error') + ->inject('request') + ->inject('response') + ->action(function (App $utopia, throwable $error, Request $request, Response $response) { + $route = $utopia->match($request); + logError($error, "httpError", $route); + + switch ($error->getCode()) { + case 400: // Error allowed publicly + case 401: // Error allowed publicly + case 402: // Error allowed publicly + case 403: // Error allowed publicly + case 404: // Error allowed publicly + case 406: // Error allowed publicly + case 409: // Error allowed publicly + case 412: // Error allowed publicly + case 425: // Error allowed publicly + case 429: // Error allowed publicly + case 501: // Error allowed publicly + case 503: // Error allowed publicly + $code = $error->getCode(); + break; + default: + $code = 500; // All other errors get the generic 500 server error status code + } + + $output = [ + 'message' => $error->getMessage(), + 'code' => $error->getCode(), + 'file' => $error->getFile(), + 'line' => $error->getLine(), + 'trace' => $error->getTrace(), + 'version' => App::getEnv('_APP_VERSION', 'UNKNOWN') + ]; + + $response + ->addHeader('Cache-Control', 'no-cache, no-store, must-revalidate') + ->addHeader('Expires', '0') + ->addHeader('Pragma', 'no-cache') + ->setStatusCode($code); + + $response->json($output); + }); + +App::init() + ->inject('request') + ->action(function (Request $request) { + $secretKey = $request->getHeader('x-appwrite-executor-key', ''); + if (empty($secretKey)) { + throw new Exception('Missing executor key', 401); + } + + if ($secretKey !== App::getEnv('_APP_EXECUTOR_SECRET', '')) { + throw new Exception('Missing executor key', 401); + } + }); + + +$http->on('start', function ($http) { + global $orchestrationPool; + global $activeRuntimes; + + /** + * Warmup: make sure images are ready to run fast 🚀 + */ + $runtimes = new Runtimes('v2'); + $allowList = empty(App::getEnv('_APP_FUNCTIONS_RUNTIMES')) ? [] : \explode(',', App::getEnv('_APP_FUNCTIONS_RUNTIMES')); + $runtimes = $runtimes->getAll(true, $allowList); + foreach ($runtimes as $runtime) { + go(function () use ($runtime, $orchestrationPool) { + try { + $orchestration = $orchestrationPool->get(); + Console::info('Warming up ' . $runtime['name'] . ' ' . $runtime['version'] . ' environment...'); + $response = $orchestration->pull($runtime['image']); + if ($response) { + Console::success("Successfully Warmed up {$runtime['name']} {$runtime['version']}!"); + } else { + Console::warning("Failed to Warmup {$runtime['name']} {$runtime['version']}!"); + } + } catch (\Throwable $th) { + } finally { + $orchestrationPool->put($orchestration); + } + }); + } + + /** + * Remove residual runtimes + */ + Console::info('Removing orphan runtimes...'); + try { + $orchestration = $orchestrationPool->get(); + $orphans = $orchestration->list(['label' => 'openruntimes-type=runtime']); + } finally { + $orchestrationPool->put($orchestration); + } + + foreach ($orphans as $runtime) { + go(function () use ($runtime, $orchestrationPool) { + try { + $orchestration = $orchestrationPool->get(); + $orchestration->remove($runtime->getName(), true); + Console::success("Successfully removed {$runtime->getName()}"); + } catch (\Throwable $th) { + Console::error('Orphan runtime deletion failed: ' . $th->getMessage()); + } finally { + $orchestrationPool->put($orchestration); + } + }); + } + + /** + * Register handlers for shutdown + */ + @Process::signal(SIGINT, function () use ($http) { + $http->shutdown(); + }); + + @Process::signal(SIGQUIT, function () use ($http) { + $http->shutdown(); + }); + + @Process::signal(SIGKILL, function () use ($http) { + $http->shutdown(); + }); + + @Process::signal(SIGTERM, function () use ($http) { + $http->shutdown(); + }); + + /** + * Run a maintenance worker every MAINTENANCE_INTERVAL seconds to remove inactive runtimes + */ + Timer::tick(MAINTENANCE_INTERVAL * 1000, function () use ($orchestrationPool, $activeRuntimes) { + Console::warning("Running maintenance task ..."); + foreach ($activeRuntimes as $runtime) { + $inactiveThreshold = \time() - App::getEnv('_APP_FUNCTIONS_INACTIVE_THRESHOLD', 60); + if ($runtime['updated'] < $inactiveThreshold) { + go(function () use ($runtime, $orchestrationPool, $activeRuntimes) { + try { + $orchestration = $orchestrationPool->get(); + $orchestration->remove($runtime['name'], true); + $activeRuntimes->del($runtime['name']); + Console::success("Successfully removed {$runtime['name']}"); + } catch (\Throwable $th) { + Console::error('Inactive Runtime deletion failed: ' . $th->getMessage()); + } finally { + $orchestrationPool->put($orchestration); + } + }); + } + } + }); +}); + + +$http->on('beforeShutdown', function () { + global $orchestrationPool; + Console::info('Cleaning up containers before shutdown...'); + + $orchestration = $orchestrationPool->get(); + $functionsToRemove = $orchestration->list(['label' => 'openruntimes-type=runtime']); + $orchestrationPool->put($orchestration); + + foreach ($functionsToRemove as $container) { + go(function () use ($orchestrationPool, $container) { + try { + $orchestration = $orchestrationPool->get(); + $orchestration->remove($container->getId(), true); + Console::info('Removed container ' . $container->getName()); + } catch (\Throwable $th) { + Console::error('Failed to remove container: ' . $container->getName()); + } finally { + $orchestrationPool->put($orchestration); + } + }); + } +}); + + +$http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swooleResponse) { + $request = new Request($swooleRequest); + $response = new Response($swooleResponse); + $app = new App('UTC'); + + try { + $app->run($request, $response); + } catch (\Throwable $th) { + logError($th, "serverError"); + $swooleResponse->setStatusCode(500); + $output = [ + 'message' => 'Error: ' . $th->getMessage(), + 'code' => 500, + 'file' => $th->getFile(), + 'line' => $th->getLine(), + 'trace' => $th->getTrace() + ]; + $swooleResponse->end(\json_encode($output)); + } +}); + +$http->start(); diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index cc53fb885..bff03a2b6 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -114,8 +114,6 @@ services: - _APP_SMTP_USERNAME - _APP_SMTP_PASSWORD - _APP_USAGE_STATS - - _APP_INFLUXDB_HOST - - _APP_INFLUXDB_PORT - _APP_STORAGE_LIMIT - _APP_STORAGE_PREVIEW_LIMIT - _APP_STORAGE_ANTIVIRUS @@ -132,8 +130,6 @@ services: - _APP_EXECUTOR_HOST - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG - - _APP_STATSD_HOST - - _APP_STATSD_PORT - _APP_MAINTENANCE_INTERVAL - _APP_MAINTENANCE_RETENTION_EXECUTION - _APP_MAINTENANCE_RETENTION_CACHE @@ -434,6 +430,42 @@ services: - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG + appwrite-worker-usage: + image: /: + entrypoint: worker-usage + <<: *x-logging + container_name: appwrite-worker-usage + networks: + - appwrite + volumes: + - ./app:/usr/src/code/app + - ./src:/usr/src/code/src + depends_on: + - redis + - mariadb + environment: + - _APP_ENV + - _APP_WORKER_PER_CORE + - _APP_CONNECTIONS_MAX + - _APP_POOL_CLIENTS + - _APP_OPENSSL_KEY_V1 + - _APP_DB_HOST + - _APP_DB_PORT + - _APP_DB_SCHEMA + - _APP_DB_USER + - _APP_DB_PASS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS + - _APP_CONNECTIONS_DB_CONSOLE + - _APP_CONNECTIONS_DB_PROJECT + - _APP_CONNECTIONS_CACHE + - _APP_CONNECTIONS_QUEUE + - _APP_USAGE_STATS + - DOCKERHUB_PULL_USERNAME + - DOCKERHUB_PULL_PASSWORD + appwrite-maintenance: image: /: entrypoint: maintenance @@ -465,35 +497,6 @@ services: - _APP_MAINTENANCE_RETENTION_AUDIT - _APP_MAINTENANCE_RETENTION_USAGE_HOURLY - appwrite-usage: - image: /: - entrypoint: usage - container_name: appwrite-usage - <<: *x-logging - restart: unless-stopped - networks: - - appwrite - depends_on: - - influxdb - - mariadb - environment: - - _APP_ENV - - _APP_OPENSSL_KEY_V1 - - _APP_DB_HOST - - _APP_DB_PORT - - _APP_DB_SCHEMA - - _APP_DB_USER - - _APP_DB_PASS - - _APP_USAGE_AGGREGATION_INTERVAL - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_INFLUXDB_HOST - - _APP_INFLUXDB_PORT - - _APP_LOGGING_PROVIDER - - _APP_LOGGING_CONFIG - appwrite-schedule: image: /: entrypoint: schedule @@ -578,27 +581,6 @@ services: # volumes: # - appwrite-uploads:/storage/uploads - influxdb: - image: appwrite/influxdb:1.5.0 - container_name: appwrite-influxdb - <<: *x-logging - restart: unless-stopped - networks: - - appwrite - volumes: - - appwrite-influxdb:/var/lib/influxdb:rw - - telegraf: - image: appwrite/telegraf:1.4.0 - container_name: appwrite-telegraf - <<: *x-logging - restart: unless-stopped - networks: - - appwrite - environment: - - _APP_INFLUXDB_HOST - - _APP_INFLUXDB_PORT - networks: gateway: name: gateway @@ -613,7 +595,6 @@ volumes: appwrite-cache: appwrite-uploads: appwrite-certificates: - appwrite-influxdb: appwrite-config: appwrite-functions: appwrite-builds: diff --git a/app/workers/builds.php b/app/workers/builds.php index 1e6d2c8e2..7754e3ec6 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -247,22 +247,6 @@ class BuildsV1 extends Worker channels: $target['channels'], roles: $target['roles'] ); - - /** Update usage stats */ - if (App::getEnv('_APP_USAGE_STATS', 'enabled') === 'enabled') { - // $statsd = $register->get('statsd'); - // $usage = new Stats($statsd); - // $usage - // ->setParam('projectInternalId', $project->getInternalId()) - // ->setParam('projectId', $project->getId()) - // ->setParam('functionId', $function->getId()) - // ->setParam('builds.{scope}.compute', 1) - // ->setParam('buildStatus', $build->getAttribute('status', '')) - // ->setParam('buildTime', $build->getAttribute('duration')) - // ->setParam('networkRequestSize', 0) - // ->setParam('networkResponseSize', 0) - // ->submit(); - } } } diff --git a/app/workers/functions.php b/app/workers/functions.php index 4f27f8031..a0505c05f 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -201,21 +201,6 @@ Server::setResource('execute', function () { channels: $target['channels'], roles: $target['roles'] ); - - /** Update usage stats */ - if (App::getEnv('_APP_USAGE_STATS', 'enabled') === 'enabled') { - // $usage = new Stats($statsd); - // $usage - // ->setParam('projectId', $project->getId()) - // ->setParam('projectInternalId', $project->getInternalId()) - // ->setParam('functionId', $function->getId()) // TODO: We should use functionInternalId in usage stats - // ->setParam('executions.{scope}.compute', 1) - // ->setParam('executionStatus', $execution->getAttribute('status', '')) - // ->setParam('executionTime', $execution->getAttribute('duration')) - // ->setParam('networkRequestSize', 0) - // ->setParam('networkResponseSize', 0) - // ->submit(); - } }; }); diff --git a/app/workers/usage.php b/app/workers/usage.php index 2b0c6f80c..844c33690 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -53,26 +53,26 @@ $server $slice = array_slice($stats, 0, count($stats)); array_splice($stats, 0, count($stats)); - + var_dump($slice); foreach ($slice as $metric) { foreach ($periods as $period => $format) { $time = 'inf' === $period ? null : date($format, time()); $id = \md5("{$time}_{$period}_{$metric['key']}"); - $adapter = new Database( - $pools + $dbForProject = new Database( + $pools ->get($metric['database']) ->pop() ->getResource(), - $cache - ); + $cache + ); - $adapter->setNamespace('_' . $metric['projectInternalId']); + $dbForProject->setNamespace('_' . $metric['projectInternalId']); try { - $document = $adapter->getDocument('stats', $id); + $document = $dbForProject->getDocument('stats', $id); if ($document->isEmpty()) { //console::log("{$period}, {$time}, {$metric['key']}={$metric['value']}"); - $adapter->createDocument('stats', new Document([ + $dbForProject->createDocument('stats', new Document([ '$id' => $id, 'period' => $period, 'time' => $time, @@ -82,7 +82,7 @@ $server ])); } else { //console::info("{$document->getAttribute('period')}, {$document->getAttribute('time')}, {$document->getAttribute('metric')} = {$value}"); - $adapter->decreaseDocumentAttribute( + $dbForProject->increaseDocumentAttribute( 'stats', $document->getId(), 'value', diff --git a/bin/executor b/bin/executor new file mode 100644 index 000000000..f08bd68e4 --- /dev/null +++ b/bin/executor @@ -0,0 +1,3 @@ +#!/bin/sh + +php -e /usr/src/code/app/executor.php -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php \ No newline at end of file diff --git a/bin/usage b/bin/usage deleted file mode 100755 index 2709200ae..000000000 --- a/bin/usage +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -php /usr/src/code/app/cli.php usage $@ \ No newline at end of file diff --git a/composer.json b/composer.json index 3f6ad6ff7..77812ce9b 100644 --- a/composer.json +++ b/composer.json @@ -69,7 +69,6 @@ "resque/php-resque": "1.3.6", "matomo/device-detector": "6.0.0", "dragonmantank/cron-expression": "3.3.1", - "influxdb/influxdb-php": "1.15.2", "phpmailer/phpmailer": "6.6.0", "chillerlan/php-qrcode": "4.3.3", "adhocore/jwt": "1.1.2", diff --git a/docker-compose.yml b/docker-compose.yml index 721c943af..5d0c213f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ version: '3' services: traefik: - image: traefik:2.9 + image: traefik:2.7 <<: *x-logging container_name: appwrite-traefik command: @@ -33,15 +33,6 @@ services: - 8080:80 - 443:443 - 9500:8080 - ulimits: - nofile: - soft: 655350 - hard: 655350 - sysctls: - - net.core.somaxconn=1024 - - net.ipv4.tcp_rmem=1024 4096 16384 - - net.ipv4.tcp_wmem=1024 4096 16384 - - net.ipv4.ip_local_port_range=1025 65535 volumes: - /var/run/docker.sock:/var/run/docker.sock - appwrite-config:/storage/config:ro @@ -62,7 +53,7 @@ services: DEBUG: false TESTING: true VERSION: dev - ports: + ports: - 9501:80 networks: - appwrite @@ -93,13 +84,11 @@ services: - ./public:/usr/src/code/public - ./src:/usr/src/code/src - ./dev:/usr/local/dev - - ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database - depends_on: - mariadb - redis # - clamav - entrypoint: + entrypoint: - php - -e - app/http.php @@ -107,12 +96,10 @@ services: environment: - _APP_ENV - _APP_WORKER_PER_CORE - - _APP_SERVER_MULTIPROCESS=enabled - _APP_LOCALE - _APP_CONSOLE_WHITELIST_ROOT - _APP_CONSOLE_WHITELIST_EMAILS - _APP_CONSOLE_WHITELIST_IPS - - _APP_CONSOLE_INVITES - _APP_SYSTEM_EMAIL_NAME - _APP_SYSTEM_EMAIL_ADDRESS - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS @@ -122,48 +109,59 @@ services: - _APP_OPENSSL_KEY_V1 - _APP_DOMAIN - _APP_DOMAIN_TARGET + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - - _APP_CONNECTIONS_PUBSUB - _APP_SMTP_HOST - _APP_SMTP_PORT - _APP_SMTP_SECURE - _APP_SMTP_USERNAME - _APP_SMTP_PASSWORD - _APP_USAGE_STATS - - _APP_INFLUXDB_HOST - - _APP_INFLUXDB_PORT - _APP_STORAGE_LIMIT - _APP_STORAGE_PREVIEW_LIMIT - _APP_STORAGE_ANTIVIRUS - _APP_STORAGE_ANTIVIRUS_HOST - _APP_STORAGE_ANTIVIRUS_PORT - - _APP_CONNECTIONS_STORAGE + - _APP_STORAGE_DEVICE + - _APP_STORAGE_S3_ACCESS_KEY + - _APP_STORAGE_S3_SECRET + - _APP_STORAGE_S3_REGION + - _APP_STORAGE_S3_BUCKET + - _APP_STORAGE_DO_SPACES_ACCESS_KEY + - _APP_STORAGE_DO_SPACES_SECRET + - _APP_STORAGE_DO_SPACES_REGION + - _APP_STORAGE_DO_SPACES_BUCKET + - _APP_STORAGE_BACKBLAZE_ACCESS_KEY + - _APP_STORAGE_BACKBLAZE_SECRET + - _APP_STORAGE_BACKBLAZE_REGION + - _APP_STORAGE_BACKBLAZE_BUCKET + - _APP_STORAGE_LINODE_ACCESS_KEY + - _APP_STORAGE_LINODE_SECRET + - _APP_STORAGE_LINODE_REGION + - _APP_STORAGE_LINODE_BUCKET + - _APP_STORAGE_WASABI_ACCESS_KEY + - _APP_STORAGE_WASABI_SECRET + - _APP_STORAGE_WASABI_REGION + - _APP_STORAGE_WASABI_BUCKET - _APP_FUNCTIONS_SIZE_LIMIT - _APP_FUNCTIONS_TIMEOUT - _APP_FUNCTIONS_BUILD_TIMEOUT + - _APP_FUNCTIONS_CONTAINERS - _APP_FUNCTIONS_CPUS - _APP_FUNCTIONS_MEMORY + - _APP_FUNCTIONS_MEMORY_SWAP - _APP_FUNCTIONS_RUNTIMES - _APP_EXECUTOR_SECRET - _APP_EXECUTOR_HOST - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG - - _APP_STATSD_HOST - - _APP_STATSD_PORT - _APP_MAINTENANCE_INTERVAL - _APP_MAINTENANCE_RETENTION_EXECUTION - _APP_MAINTENANCE_RETENTION_CACHE @@ -172,7 +170,6 @@ services: - _APP_MAINTENANCE_RETENTION_USAGE_HOURLY - _APP_SMS_PROVIDER - _APP_SMS_FROM - - _APP_REGION appwrite-realtime: entrypoint: realtime @@ -180,7 +177,7 @@ services: container_name: appwrite-realtime image: appwrite-dev restart: unless-stopped - ports: + ports: - 9505:80 labels: - "traefik.enable=true" @@ -208,25 +205,15 @@ services: environment: - _APP_ENV - _APP_WORKER_PER_CORE - - _APP_SERVER_MULTIPROCESS=enabled - _APP_OPTIONS_ABUSE - _APP_OPENSSL_KEY_V1 + - _APP_REDIS_HOST + - _APP_REDIS_PORT - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_PUBSUB - - _APP_CONNECTIONS_QUEUE - _APP_USAGE_STATS - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -246,21 +233,16 @@ services: - mariadb environment: - _APP_ENV - - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -280,16 +262,12 @@ services: - request-catcher environment: - _APP_ENV - - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_OPENSSL_KEY_V1 - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_REDIS_USER - _APP_REDIS_PASS - - _APP_CONNECTIONS_QUEUE - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -303,7 +281,7 @@ services: depends_on: - redis - mariadb - volumes: + volumes: - appwrite-uploads:/storage/uploads:rw - appwrite-cache:/storage/cache:rw - appwrite-functions:/storage/functions:rw @@ -313,24 +291,37 @@ services: - ./src:/usr/src/code/src environment: - _APP_ENV - - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_OPENSSL_KEY_V1 + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - - _APP_CONNECTIONS_STORAGE + - _APP_STORAGE_DEVICE + - _APP_STORAGE_S3_ACCESS_KEY + - _APP_STORAGE_S3_SECRET + - _APP_STORAGE_S3_REGION + - _APP_STORAGE_S3_BUCKET + - _APP_STORAGE_DO_SPACES_ACCESS_KEY + - _APP_STORAGE_DO_SPACES_SECRET + - _APP_STORAGE_DO_SPACES_REGION + - _APP_STORAGE_DO_SPACES_BUCKET + - _APP_STORAGE_BACKBLAZE_ACCESS_KEY + - _APP_STORAGE_BACKBLAZE_SECRET + - _APP_STORAGE_BACKBLAZE_REGION + - _APP_STORAGE_BACKBLAZE_BUCKET + - _APP_STORAGE_LINODE_ACCESS_KEY + - _APP_STORAGE_LINODE_SECRET + - _APP_STORAGE_LINODE_REGION + - _APP_STORAGE_LINODE_BUCKET + - _APP_STORAGE_WASABI_ACCESS_KEY + - _APP_STORAGE_WASABI_SECRET + - _APP_STORAGE_WASABI_REGION + - _APP_STORAGE_WASABI_BUCKET - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG - _APP_EXECUTOR_SECRET @@ -343,31 +334,25 @@ services: image: appwrite-dev networks: - appwrite - volumes: + volumes: - ./app:/usr/src/code/app - ./src:/usr/src/code/src + #- ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database depends_on: - redis - mariadb environment: - _APP_ENV - - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_OPENSSL_KEY_V1 + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -378,7 +363,7 @@ services: image: appwrite-dev networks: - appwrite - volumes: + volumes: - ./app:/usr/src/code/app - ./src:/usr/src/code/src depends_on: @@ -386,26 +371,18 @@ services: - mariadb environment: - _APP_ENV - - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_OPENSSL_KEY_V1 - _APP_EXECUTOR_SECRET - _APP_EXECUTOR_HOST + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - - _APP_CONNECTIONS_STORAGE - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -419,33 +396,26 @@ services: depends_on: - redis - mariadb - volumes: + volumes: - appwrite-config:/storage/config:rw - appwrite-certificates:/storage/certificates:rw - ./app:/usr/src/code/app - ./src:/usr/src/code/src environment: - _APP_ENV - - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_OPENSSL_KEY_V1 - _APP_DOMAIN - _APP_DOMAIN_TARGET - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -462,26 +432,19 @@ services: depends_on: - redis - mariadb - - openruntimes-executor + - appwrite-executor environment: - _APP_ENV - - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_OPENSSL_KEY_V1 + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - _APP_FUNCTIONS_TIMEOUT - _APP_EXECUTOR_SECRET - _APP_EXECUTOR_HOST @@ -489,6 +452,67 @@ services: - DOCKERHUB_PULL_USERNAME - DOCKERHUB_PULL_PASSWORD + appwrite-executor: + container_name: appwrite-executor + <<: *x-logging + entrypoint: executor + stop_signal: SIGINT + image: appwrite-dev + networks: + appwrite: + runtimes: + ports: + - 9519:80 + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - ./app:/usr/src/code/app + - ./src:/usr/src/code/src + - appwrite-functions:/storage/functions:rw + - appwrite-builds:/storage/builds:rw + - /tmp:/tmp:rw + depends_on: + - redis + - mariadb + - appwrite + environment: + - _APP_ENV + - _APP_VERSION + - _APP_FUNCTIONS_TIMEOUT + - _APP_FUNCTIONS_BUILD_TIMEOUT + - _APP_FUNCTIONS_CONTAINERS + - _APP_FUNCTIONS_RUNTIMES + - _APP_FUNCTIONS_CPUS + - _APP_FUNCTIONS_MEMORY + - _APP_FUNCTIONS_MEMORY_SWAP + - _APP_FUNCTIONS_INACTIVE_THRESHOLD + - _APP_EXECUTOR_SECRET + - OPEN_RUNTIMES_NETWORK + - _APP_LOGGING_PROVIDER + - _APP_LOGGING_CONFIG + - _APP_STORAGE_DEVICE + - _APP_STORAGE_S3_ACCESS_KEY + - _APP_STORAGE_S3_SECRET + - _APP_STORAGE_S3_REGION + - _APP_STORAGE_S3_BUCKET + - _APP_STORAGE_DO_SPACES_ACCESS_KEY + - _APP_STORAGE_DO_SPACES_SECRET + - _APP_STORAGE_DO_SPACES_REGION + - _APP_STORAGE_DO_SPACES_BUCKET + - _APP_STORAGE_BACKBLAZE_ACCESS_KEY + - _APP_STORAGE_BACKBLAZE_SECRET + - _APP_STORAGE_BACKBLAZE_REGION + - _APP_STORAGE_BACKBLAZE_BUCKET + - _APP_STORAGE_LINODE_ACCESS_KEY + - _APP_STORAGE_LINODE_SECRET + - _APP_STORAGE_LINODE_REGION + - _APP_STORAGE_LINODE_BUCKET + - _APP_STORAGE_WASABI_ACCESS_KEY + - _APP_STORAGE_WASABI_SECRET + - _APP_STORAGE_WASABI_REGION + - _APP_STORAGE_WASABI_BUCKET + - DOCKERHUB_PULL_USERNAME + - DOCKERHUB_PULL_PASSWORD + appwrite-worker-mails: entrypoint: worker-mails <<: *x-logging @@ -505,9 +529,6 @@ services: # - smtp environment: - _APP_ENV - - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_OPENSSL_KEY_V1 - _APP_SYSTEM_EMAIL_NAME - _APP_SYSTEM_EMAIL_ADDRESS @@ -515,7 +536,6 @@ services: - _APP_REDIS_PORT - _APP_REDIS_USER - _APP_REDIS_PASS - - _APP_CONNECTIONS_QUEUE - _APP_SMTP_HOST - _APP_SMTP_PORT - _APP_SMTP_SECURE @@ -538,14 +558,10 @@ services: - redis environment: - _APP_ENV - - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_REDIS_USER - _APP_REDIS_PASS - - _APP_CONNECTIONS_QUEUE - _APP_SMS_PROVIDER - _APP_SMS_FROM - _APP_LOGGING_PROVIDER @@ -598,28 +614,23 @@ services: volumes: - ./app:/usr/src/code/app - ./src:/usr/src/code/src + #- ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database depends_on: - redis environment: - _APP_ENV - - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_DOMAIN - _APP_DOMAIN_TARGET - _APP_OPENSSL_KEY_V1 + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - _APP_MAINTENANCE_INTERVAL - _APP_MAINTENANCE_RETENTION_EXECUTION - _APP_MAINTENANCE_RETENTION_CACHE @@ -628,43 +639,6 @@ services: - _APP_MAINTENANCE_RETENTION_USAGE_HOURLY - _APP_MAINTENANCE_RETENTION_SCHEDULES - appwrite-usage: - entrypoint: usage - <<: *x-logging - container_name: appwrite-usage - image: appwrite-dev - networks: - - appwrite - volumes: - - ./app:/usr/src/code/app - - ./src:/usr/src/code/src - - ./dev:/usr/local/dev - depends_on: - - influxdb - - mariadb - environment: - - _APP_ENV - - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - - _APP_OPENSSL_KEY_V1 - - _APP_DB_HOST - - _APP_DB_PORT - - _APP_DB_SCHEMA - - _APP_DB_USER - - _APP_DB_PASS - - _APP_INFLUXDB_HOST - - _APP_INFLUXDB_PORT - - _APP_USAGE_AGGREGATION_INTERVAL - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_LOGGING_PROVIDER - - _APP_LOGGING_CONFIG appwrite-schedule: entrypoint: schedule @@ -677,54 +651,13 @@ services: - ./app:/usr/src/code/app - ./src:/usr/src/code/src depends_on: - - mariadb - redis environment: - _APP_ENV - - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_REDIS_USER - _APP_REDIS_PASS - - _APP_DB_HOST - - _APP_DB_PORT - - _APP_DB_SCHEMA - - _APP_DB_USER - - _APP_DB_PASS - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - - _APP_REGION - - openruntimes-executor: - container_name: openruntimes-executor - hostname: exc1 - <<: *x-logging - stop_signal: SIGINT - image: openruntimes/executor:0.1.6 - networks: - - appwrite - - runtimes - volumes: - - /var/run/docker.sock:/var/run/docker.sock - - appwrite-builds:/storage/builds:rw - - appwrite-functions:/storage/functions:rw - - /tmp:/tmp:rw - environment: - - OPR_EXECUTOR_CONNECTION_STORAGE=$_APP_CONNECTIONS_STORAGE - - OPR_EXECUTOR_INACTIVE_TRESHOLD=$_APP_FUNCTIONS_INACTIVE_THRESHOLD - - OPR_EXECUTOR_MAINTENANCE_INTERVAL=$_APP_FUNCTIONS_MAINTENANCE_INTERVAL - - OPR_EXECUTOR_NETWORK=$_APP_FUNCTIONS_RUNTIMES_NETWORK - - OPR_EXECUTOR_DOCKER_HUB_USERNAME=$_APP_DOCKER_HUB_USERNAME - - OPR_EXECUTOR_DOCKER_HUB_PASSWORD=$_APP_DOCKER_HUB_PASSWORD - - OPR_EXECUTOR_ENV=$_APP_ENV - - OPR_EXECUTOR_RUNTIMES=$_APP_FUNCTIONS_RUNTIMES - - OPR_EXECUTOR_SECRET=$_APP_EXECUTOR_SECRET - - OPR_EXECUTOR_LOGGING_PROVIDER=$_APP_LOGGING_PROVIDER - - OPR_EXECUTOR_LOGGING_CONFIG=$_APP_LOGGING_CONFIG mariadb: image: mariadb:10.7 # fix issues when upgrading using: mysql_upgrade -u root -p @@ -741,11 +674,13 @@ services: - MYSQL_DATABASE=${_APP_DB_SCHEMA} - MYSQL_USER=${_APP_DB_USER} - MYSQL_PASSWORD=${_APP_DB_PASS} - command: 'mysqld --innodb-flush-method=fsync --max_connections=${_APP_CONNECTIONS_MAX}' + command: 'mysqld --innodb-flush-method=fsync' # add ' --query_cache_size=0' for DB tests + # command: mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bu && mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bu # smtp: # image: appwrite/smtp:1.2.0 # container_name: appwrite-smtp + # restart: unless-stopped # networks: # - appwrite # environment: @@ -777,28 +712,8 @@ services: # - appwrite # volumes: # - appwrite-uploads:/storage/uploads - - influxdb: - image: appwrite/influxdb:1.5.0 - container_name: appwrite-influxdb - <<: *x-logging - networks: - - appwrite - volumes: - - appwrite-influxdb:/var/lib/influxdb:rw - - telegraf: - image: appwrite/telegraf:1.4.0 - container_name: appwrite-telegraf - <<: *x-logging - networks: - - appwrite - environment: - - _APP_INFLUXDB_HOST - - _APP_INFLUXDB_PORT - # Dev Tools Start ------------------------------------------------------------------------------------------ - # + # # The Appwrite Team uses the following tools to help debug, monitor and diagnose the Appwrite stack # # Here is a description of the different tools and why are we using them: @@ -807,7 +722,6 @@ services: # RequestCatcher - An HTTP server. Catches all system https calls and displays them using a simple HTTP API. Used to debug & tests webhooks and HTTP tasks # RedisCommander - A nice UI for exploring Redis data # Resque - A nice UI for exploring Redis pub/sub, view the different queues workloads, pending and failed tasks - # Chronograf - A nice UI for exploring InfluxDB data # Webgrind - A nice UI for exploring and debugging code-level stuff maildev: # used mainly for dev tests @@ -832,26 +746,15 @@ services: image: adminer container_name: appwrite-adminer <<: *x-logging + restart: always ports: - 9506:8080 networks: - appwrite - - # appwrite-volume-sync: - # entrypoint: volume-sync - # <<: *x-logging - # container_name: appwrite-volume-sync - # image: appwrite-dev - # command: - # - --source=/data/src/ --destination=/data/dest/ --interval=10 - # networks: - # - appwrite - # # volumes: # Mount the rsync source and destination directories - # # - /nfs/config:/data/src - # # - /storage/config:/data/dest # redis-commander: # image: rediscommander/redis-commander:latest + # restart: unless-stopped # networks: # - appwrite # environment: @@ -861,6 +764,7 @@ services: # resque: # image: appwrite/resque-web:1.1.0 + # restart: unless-stopped # networks: # - appwrite # ports: @@ -870,41 +774,19 @@ services: # - RESQUE_WEB_PORT=6379 # - RESQUE_WEB_HTTP_BASIC_AUTH_USER=user # - RESQUE_WEB_HTTP_BASIC_AUTH_PASSWORD=password - - # chronograf: - # image: chronograf:1.6 - # container_name: appwrite-chronograf - # networks: - # - appwrite - # volumes: - # - appwrite-chronograf:/var/lib/chronograf - # ports: - # - "8888:8888" - # environment: - # - INFLUXDB_URL=http://influxdb:8086 - # - KAPACITOR_URL=http://kapacitor:9092 - # - AUTH_DURATION=48h - # - TOKEN_SECRET=duperduper5674829!jwt - # - GH_CLIENT_ID=d86f7145a41eacfc52cc - # - GH_CLIENT_SECRET=9e0081062367a2134e7f2ea95ba1a32d08b6c8ab - # - GH_ORGS=appwrite - # webgrind: # image: 'jokkedk/webgrind:latest' # volumes: # - './debug:/tmp' # ports: # - '3001:80' - + # Dev Tools End ------------------------------------------------------------------------------------------ networks: gateway: - name: gateway appwrite: - name: appwrite runtimes: - name: runtimes volumes: appwrite-mariadb: @@ -912,8 +794,8 @@ volumes: appwrite-cache: appwrite-uploads: appwrite-certificates: - appwrite-influxdb: - appwrite-config: appwrite-functions: appwrite-builds: + appwrite-config: + appwrite-executor: # appwrite-chronograf: diff --git a/docs/specs/overview.drawio.svg b/docs/specs/overview.drawio.svg index 5fc685cd4..2eb08f2b3 100644 --- a/docs/specs/overview.drawio.svg +++ b/docs/specs/overview.drawio.svg @@ -589,47 +589,47 @@ - - - -
-
-
- StatsD -
- - (Telegraf) - -
-
-
-
- - StatsD... - -
-
+ + + + + + + + + + + + + + + + + + + + - - - -
-
-
- TimeSeries -
- - (InfluxDB) - -
-
-
-
- - TimeSeries... - -
-
+ + + + + + + + + + + + + + + + + + + + diff --git a/docs/tutorials/add-environment-variable.md b/docs/tutorials/add-environment-variable.md index f5df1e69c..511690858 100644 --- a/docs/tutorials/add-environment-variable.md +++ b/docs/tutorials/add-environment-variable.md @@ -12,7 +12,7 @@ This tutorial will cover how to properly add a new environment variable in Appwr ### Naming environment variable -The environment variables in Appwrite are prefixed with `_APP_`. If it belongs to a specific category, the category name is appended as `_APP_REDIS` for the Redis category. The available categories are General, Redis, MariaDB, InfluxDB, StatsD, SMTP, Storage, Functions and Maintenance. Finally, a properly describing name is given to the variable. For example, `_APP_REDIS_HOST` is an environment variable for the hostname of your Redis instance. You can find more information on available categories and existing environment variables in the [environment variables doc](https://appwrite.io/docs/environment-variables). +The environment variables in Appwrite are prefixed with `_APP_`. If it belongs to a specific category, the category name is appended as `_APP_REDIS` for the Redis category. The available categories are General, Redis, MariaDB, SMTP, Storage, Functions and Maintenance. Finally, a properly describing name is given to the variable. For example, `_APP_REDIS_HOST` is an environment variable for the hostname of your Redis instance. You can find more information on available categories and existing environment variables in the [environment variables doc](https://appwrite.io/docs/environment-variables). ### Describe new environment variable diff --git a/docs/tutorials/multi-architecture-support.md b/docs/tutorials/multi-architecture-support.md index f76eda047..25751ce17 100644 --- a/docs/tutorials/multi-architecture-support.md +++ b/docs/tutorials/multi-architecture-support.md @@ -6,8 +6,6 @@ A list of Appwrite CPU architecture support status. We use this list to track th |---|---|---|---|---|---|---|---| | appwrite/appwrite | 🟢 | 🟢 | 🟢 | 🟢 | 🟢 | 🟢 | 🟢 | | appwrite/mariadb | 🟢 | 🟢 | 🔴 | 🔴 | 🔴 | 🟢 | 🔴 | -| appwrite/influxdb | 🟢 | 🟢 | 🟢 | 🟢 | 🔴 | 🔴 | 🔴 | -| appwrite/telegraf | 🟢 | 🟢 | 🟢 | 🟢 | 🔴 | 🔴 | 🔴 | | appwrite/clamav | 🟢 | 🟢 | 🟢 | 🟢 | 🔴 | 🟢 | 🟢 | | traefik | 🟢 | 🔴 | 🟢 | 🔴 | 🟢 | 🔴 | 🔴 | | redis | 🟢 | 🟢 | 🟢 | 🟢 | 🟢 | 🟢 | 🟢 | diff --git a/src/Appwrite/Platform/Tasks/Doctor.php b/src/Appwrite/Platform/Tasks/Doctor.php index 38af7c737..9a6d6a284 100644 --- a/src/Appwrite/Platform/Tasks/Doctor.php +++ b/src/Appwrite/Platform/Tasks/Doctor.php @@ -187,26 +187,6 @@ class Doctor extends Action Console::error('🔴 ' . str_pad("SMTP", 47, '.') . 'disconnected'); } - $host = App::getEnv('_APP_STATSD_HOST', 'telegraf'); - $port = App::getEnv('_APP_STATSD_PORT', 8125); - - if ($fp = @\fsockopen('udp://' . $host, $port, $errCode, $errStr, 2)) { - Console::success('🟢 ' . str_pad("StatsD", 50, '.') . 'connected'); - \fclose($fp); - } else { - Console::error('🔴 ' . str_pad("StatsD", 47, '.') . 'disconnected'); - } - - $host = App::getEnv('_APP_INFLUXDB_HOST', ''); - $port = App::getEnv('_APP_INFLUXDB_PORT', ''); - - if ($fp = @\fsockopen($host, $port, $errCode, $errStr, 2)) { - Console::success('🟢 ' . str_pad("InfluxDB", 50, '.') . 'connected'); - \fclose($fp); - } else { - Console::error('🔴 ' . str_pad("InfluxDB", 47, '.') . 'disconnected'); - } - \sleep(0.2); Console::log(''); diff --git a/tests/resources/docker/docker-compose.yml b/tests/resources/docker/docker-compose.yml index e7bbaf270..f7a6138bd 100644 --- a/tests/resources/docker/docker-compose.yml +++ b/tests/resources/docker/docker-compose.yml @@ -63,7 +63,7 @@ services: - mariadb - redis # - clamav - - influxdb + environment: - _APP_ENV - _APP_OPTIONS_ABUSE @@ -79,8 +79,6 @@ services: - _APP_DB_USER - _APP_DB_PASS - _APP_USAGE_STATS - - _APP_INFLUXDB_HOST - - _APP_INFLUXDB_PORT - _APP_STORAGE_ANTIVIRUS=disabled - _APP_STORAGE_LIMIT - _APP_FUNCTIONS_TIMEOUT @@ -90,23 +88,42 @@ services: - _APP_FUNCTIONS_MEMORY_SWAP - _APP_EXECUTOR_HOST - appwrite-worker-usage: - entrypoint: worker-usage - container_name: appwrite-worker-usage - build: - context: . - restart: unless-stopped - networks: - - appwrite - depends_on: - - redis - - telegraf - environment: - - _APP_ENV - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_STATSD_HOST - - _APP_STATSD_PORT +appwrite-worker-usage: + entrypoint: worker-usage + <<: *x-logging + container_name: appwrite-worker-usage + image: appwrite-dev + networks: + - appwrite + volumes: + - ./app:/usr/src/code/app + - ./src:/usr/src/code/src + - ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database + depends_on: + - redis + - mariadb + environment: + - _APP_ENV + - _APP_WORKER_PER_CORE + - _APP_CONNECTIONS_MAX + - _APP_POOL_CLIENTS + - _APP_OPENSSL_KEY_V1 + - _APP_DB_HOST + - _APP_DB_PORT + - _APP_DB_SCHEMA + - _APP_DB_USER + - _APP_DB_PASS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS + - _APP_CONNECTIONS_DB_CONSOLE + - _APP_CONNECTIONS_DB_PROJECT + - _APP_CONNECTIONS_CACHE + - _APP_CONNECTIONS_QUEUE + - _APP_USAGE_STATS + - DOCKERHUB_PULL_USERNAME + - DOCKERHUB_PULL_PASSWORD appwrite-worker-audits: entrypoint: worker-audits @@ -367,23 +384,6 @@ services: # - appwrite # volumes: # - appwrite-uploads:/storage/uploads - - influxdb: - image: influxdb:1.6 - container_name: appwrite-influxdb - restart: unless-stopped - networks: - - appwrite - volumes: - - appwrite-influxdb:/var/lib/influxdb:rw - - telegraf: - image: appwrite/telegraf:1.1.0 - container_name: appwrite-telegraf - restart: unless-stopped - networks: - - appwrite - # redis-commander: # image: rediscommander/redis-commander:latest # restart: unless-stopped @@ -406,26 +406,6 @@ services: # - RESQUE_WEB_PORT=6379 # - RESQUE_WEB_HTTP_BASIC_AUTH_USER=user # - RESQUE_WEB_HTTP_BASIC_AUTH_PASSWORD=password - - # chronograf: - # image: chronograf:1.5 - # container_name: appwrite-chronograf - # restart: unless-stopped - # networks: - # - appwrite - # volumes: - # - appwrite-chronograf:/var/lib/chronograf - # ports: - # - "8888:8888" - # environment: - # - INFLUXDB_URL=http://influxdb:8086 - # - KAPACITOR_URL=http://kapacitor:9092 - # - AUTH_DURATION=48h - # - TOKEN_SECRET=duperduper5674829!jwt - # - GH_CLIENT_ID=d86f7145a41eacfc52cc - # - GH_CLIENT_SECRET=9e0081062367a2134e7f2ea95ba1a32d08b6c8ab - # - GH_ORGS=appwrite - # webgrind: # image: 'jokkedk/webgrind:latest' # volumes: @@ -444,6 +424,4 @@ volumes: appwrite-uploads: appwrite-certificates: appwrite-functions: - appwrite-influxdb: - appwrite-chronograf: appwrite-config: diff --git a/tests/unit/Docker/ComposeTest.php b/tests/unit/Docker/ComposeTest.php index 9f974b597..e1677d570 100644 --- a/tests/unit/Docker/ComposeTest.php +++ b/tests/unit/Docker/ComposeTest.php @@ -29,7 +29,6 @@ class ComposeTest extends TestCase public function testServices(): void { $this->assertCount(17, $this->object->getServices()); - $this->assertEquals('appwrite-telegraf', $this->object->getService('telegraf')->getContainerName()); $this->assertEquals('appwrite', $this->object->getService('appwrite')->getContainerName()); $this->assertEquals('', $this->object->getService('appwrite')->getImageVersion()); $this->assertEquals('2.2', $this->object->getService('traefik')->getImageVersion()); From 308a9afe2272eeb8ba90766a72ad0c1dd00b4ee2 Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 11 Dec 2022 20:07:05 +0200 Subject: [PATCH 17/94] usage cleanup --- app/init.php | 7 - docker-compose.yml | 337 +++++++++++++---------- src/Appwrite/Platform/Services/Tasks.php | 1 - 3 files changed, 186 insertions(+), 159 deletions(-) diff --git a/app/init.php b/app/init.php index 5a2c603f0..d77ed3058 100644 --- a/app/init.php +++ b/app/init.php @@ -73,10 +73,7 @@ use Appwrite\Event\Func; use MaxMind\Db\Reader; use PHPMailer\PHPMailer\PHPMailer; use Swoole\Database\PDOProxy; -use Utopia\CLI\Console; use Utopia\Queue; -use Utopia\Queue\Connection; -use Utopia\Storage\Storage; const APP_NAME = 'Appwrite'; const APP_DOMAIN = 'appwrite.io'; @@ -577,13 +574,11 @@ $register->set('pools', function () { $schemes = $connection['schemes'] ?? []; $config = []; $dsns = explode(',', $connection['dsns'] ?? ''); - foreach ($dsns as &$dsn) { $dsn = explode('=', $dsn); $name = ($multipe) ? $key . '_' . $dsn[0] : $key; $dsn = $dsn[1] ?? ''; $config[] = $name; - if (empty($dsn)) { //throw new Exception(Exception::GENERAL_SERVER_ERROR, "Missing value for DSN connection in {$key}"); continue; @@ -608,7 +603,6 @@ $register->set('pools', function () { * * Resource assignment to an adapter will happen below. */ - switch ($dsnScheme) { case 'mysql': case 'mariadb': @@ -646,7 +640,6 @@ $register->set('pools', function () { $pool = new Pool($name, $poolSize, function () use ($type, $resource, $dsn) { // Get Adapter $adapter = null; - switch ($type) { case 'database': $adapter = match ($dsn->getScheme()) { diff --git a/docker-compose.yml b/docker-compose.yml index 5d0c213f6..ce6cb4987 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ version: '3' services: traefik: - image: traefik:2.7 + image: traefik:2.9 <<: *x-logging container_name: appwrite-traefik command: @@ -33,6 +33,15 @@ services: - 8080:80 - 443:443 - 9500:8080 + ulimits: + nofile: + soft: 655350 + hard: 655350 + sysctls: + - net.core.somaxconn=1024 + - net.ipv4.tcp_rmem=1024 4096 16384 + - net.ipv4.tcp_wmem=1024 4096 16384 + - net.ipv4.ip_local_port_range=1025 65535 volumes: - /var/run/docker.sock:/var/run/docker.sock - appwrite-config:/storage/config:ro @@ -76,7 +85,7 @@ services: - appwrite-cache:/storage/cache:rw - appwrite-config:/storage/config:rw - appwrite-certificates:/storage/certificates:rw - - appwrite-functions:/storage/functions:rw + - openruntimes-functions:/storage/functions:rw - ./phpunit.xml:/usr/src/code/phpunit.xml - ./tests:/usr/src/code/tests - ./app:/usr/src/code/app @@ -109,15 +118,21 @@ services: - _APP_OPENSSL_KEY_V1 - _APP_DOMAIN - _APP_DOMAIN_TARGET - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS + - _APP_CONNECTIONS_MAX + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS + - _APP_CONNECTIONS_DB_PROJECT + - _APP_CONNECTIONS_DB_CONSOLE + - _APP_CONNECTIONS_CACHE + - _APP_CONNECTIONS_QUEUE + - _APP_CONNECTIONS_PUBSUB - _APP_SMTP_HOST - _APP_SMTP_PORT - _APP_SMTP_SECURE @@ -129,34 +144,12 @@ services: - _APP_STORAGE_ANTIVIRUS - _APP_STORAGE_ANTIVIRUS_HOST - _APP_STORAGE_ANTIVIRUS_PORT - - _APP_STORAGE_DEVICE - - _APP_STORAGE_S3_ACCESS_KEY - - _APP_STORAGE_S3_SECRET - - _APP_STORAGE_S3_REGION - - _APP_STORAGE_S3_BUCKET - - _APP_STORAGE_DO_SPACES_ACCESS_KEY - - _APP_STORAGE_DO_SPACES_SECRET - - _APP_STORAGE_DO_SPACES_REGION - - _APP_STORAGE_DO_SPACES_BUCKET - - _APP_STORAGE_BACKBLAZE_ACCESS_KEY - - _APP_STORAGE_BACKBLAZE_SECRET - - _APP_STORAGE_BACKBLAZE_REGION - - _APP_STORAGE_BACKBLAZE_BUCKET - - _APP_STORAGE_LINODE_ACCESS_KEY - - _APP_STORAGE_LINODE_SECRET - - _APP_STORAGE_LINODE_REGION - - _APP_STORAGE_LINODE_BUCKET - - _APP_STORAGE_WASABI_ACCESS_KEY - - _APP_STORAGE_WASABI_SECRET - - _APP_STORAGE_WASABI_REGION - - _APP_STORAGE_WASABI_BUCKET + - _APP_CONNECTIONS_STORAGE - _APP_FUNCTIONS_SIZE_LIMIT - _APP_FUNCTIONS_TIMEOUT - _APP_FUNCTIONS_BUILD_TIMEOUT - - _APP_FUNCTIONS_CONTAINERS - _APP_FUNCTIONS_CPUS - _APP_FUNCTIONS_MEMORY - - _APP_FUNCTIONS_MEMORY_SWAP - _APP_FUNCTIONS_RUNTIMES - _APP_EXECUTOR_SECRET - _APP_EXECUTOR_HOST @@ -170,6 +163,7 @@ services: - _APP_MAINTENANCE_RETENTION_USAGE_HOURLY - _APP_SMS_PROVIDER - _APP_SMS_FROM + - _APP_REGION appwrite-realtime: entrypoint: realtime @@ -207,13 +201,21 @@ services: - _APP_WORKER_PER_CORE - _APP_OPTIONS_ABUSE - _APP_OPENSSL_KEY_V1 - - _APP_REDIS_HOST - - _APP_REDIS_PORT - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS + - _APP_CONNECTIONS_MAX + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS + - _APP_CONNECTIONS_DB_CONSOLE + - _APP_CONNECTIONS_DB_PROJECT + - _APP_CONNECTIONS_CACHE + - _APP_CONNECTIONS_PUBSUB + - _APP_CONNECTIONS_QUEUE - _APP_USAGE_STATS - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -233,16 +235,21 @@ services: - mariadb environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS + - _APP_CONNECTIONS_DB_CONSOLE + - _APP_CONNECTIONS_DB_PROJECT + - _APP_CONNECTIONS_CACHE + - _APP_CONNECTIONS_QUEUE - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -262,12 +269,14 @@ services: - request-catcher environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_REDIS_USER - _APP_REDIS_PASS + - _APP_CONNECTIONS_QUEUE - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -284,44 +293,29 @@ services: volumes: - appwrite-uploads:/storage/uploads:rw - appwrite-cache:/storage/cache:rw - - appwrite-functions:/storage/functions:rw - - appwrite-builds:/storage/builds:rw + - openruntimes-functions:/storage/functions:rw + - openruntimes-builds:/storage/builds:rw - appwrite-certificates:/storage/certificates:rw - ./app:/usr/src/code/app - ./src:/usr/src/code/src environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - _APP_STORAGE_DEVICE - - _APP_STORAGE_S3_ACCESS_KEY - - _APP_STORAGE_S3_SECRET - - _APP_STORAGE_S3_REGION - - _APP_STORAGE_S3_BUCKET - - _APP_STORAGE_DO_SPACES_ACCESS_KEY - - _APP_STORAGE_DO_SPACES_SECRET - - _APP_STORAGE_DO_SPACES_REGION - - _APP_STORAGE_DO_SPACES_BUCKET - - _APP_STORAGE_BACKBLAZE_ACCESS_KEY - - _APP_STORAGE_BACKBLAZE_SECRET - - _APP_STORAGE_BACKBLAZE_REGION - - _APP_STORAGE_BACKBLAZE_BUCKET - - _APP_STORAGE_LINODE_ACCESS_KEY - - _APP_STORAGE_LINODE_SECRET - - _APP_STORAGE_LINODE_REGION - - _APP_STORAGE_LINODE_BUCKET - - _APP_STORAGE_WASABI_ACCESS_KEY - - _APP_STORAGE_WASABI_SECRET - - _APP_STORAGE_WASABI_REGION - - _APP_STORAGE_WASABI_BUCKET + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS + - _APP_CONNECTIONS_DB_CONSOLE + - _APP_CONNECTIONS_DB_PROJECT + - _APP_CONNECTIONS_CACHE + - _APP_CONNECTIONS_QUEUE + - _APP_CONNECTIONS_STORAGE - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG - _APP_EXECUTOR_SECRET @@ -343,16 +337,21 @@ services: - mariadb environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS + - _APP_CONNECTIONS_DB_CONSOLE + - _APP_CONNECTIONS_DB_PROJECT + - _APP_CONNECTIONS_CACHE + - _APP_CONNECTIONS_QUEUE - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -371,18 +370,23 @@ services: - mariadb environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 - _APP_EXECUTOR_SECRET - _APP_EXECUTOR_HOST - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS + - _APP_CONNECTIONS_DB_CONSOLE + - _APP_CONNECTIONS_DB_PROJECT + - _APP_CONNECTIONS_CACHE + - _APP_CONNECTIONS_QUEUE - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -403,19 +407,24 @@ services: - ./src:/usr/src/code/src environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 - _APP_DOMAIN - _APP_DOMAIN_TARGET - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS + - _APP_CONNECTIONS_DB_CONSOLE + - _APP_CONNECTIONS_DB_PROJECT + - _APP_CONNECTIONS_CACHE + - _APP_CONNECTIONS_QUEUE - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG @@ -432,19 +441,24 @@ services: depends_on: - redis - mariadb - - appwrite-executor + - openruntimes-executor environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS + - _APP_CONNECTIONS_DB_CONSOLE + - _APP_CONNECTIONS_DB_PROJECT + - _APP_CONNECTIONS_CACHE + - _APP_CONNECTIONS_QUEUE - _APP_FUNCTIONS_TIMEOUT - _APP_EXECUTOR_SECRET - _APP_EXECUTOR_HOST @@ -452,67 +466,6 @@ services: - DOCKERHUB_PULL_USERNAME - DOCKERHUB_PULL_PASSWORD - appwrite-executor: - container_name: appwrite-executor - <<: *x-logging - entrypoint: executor - stop_signal: SIGINT - image: appwrite-dev - networks: - appwrite: - runtimes: - ports: - - 9519:80 - volumes: - - /var/run/docker.sock:/var/run/docker.sock - - ./app:/usr/src/code/app - - ./src:/usr/src/code/src - - appwrite-functions:/storage/functions:rw - - appwrite-builds:/storage/builds:rw - - /tmp:/tmp:rw - depends_on: - - redis - - mariadb - - appwrite - environment: - - _APP_ENV - - _APP_VERSION - - _APP_FUNCTIONS_TIMEOUT - - _APP_FUNCTIONS_BUILD_TIMEOUT - - _APP_FUNCTIONS_CONTAINERS - - _APP_FUNCTIONS_RUNTIMES - - _APP_FUNCTIONS_CPUS - - _APP_FUNCTIONS_MEMORY - - _APP_FUNCTIONS_MEMORY_SWAP - - _APP_FUNCTIONS_INACTIVE_THRESHOLD - - _APP_EXECUTOR_SECRET - - OPEN_RUNTIMES_NETWORK - - _APP_LOGGING_PROVIDER - - _APP_LOGGING_CONFIG - - _APP_STORAGE_DEVICE - - _APP_STORAGE_S3_ACCESS_KEY - - _APP_STORAGE_S3_SECRET - - _APP_STORAGE_S3_REGION - - _APP_STORAGE_S3_BUCKET - - _APP_STORAGE_DO_SPACES_ACCESS_KEY - - _APP_STORAGE_DO_SPACES_SECRET - - _APP_STORAGE_DO_SPACES_REGION - - _APP_STORAGE_DO_SPACES_BUCKET - - _APP_STORAGE_BACKBLAZE_ACCESS_KEY - - _APP_STORAGE_BACKBLAZE_SECRET - - _APP_STORAGE_BACKBLAZE_REGION - - _APP_STORAGE_BACKBLAZE_BUCKET - - _APP_STORAGE_LINODE_ACCESS_KEY - - _APP_STORAGE_LINODE_SECRET - - _APP_STORAGE_LINODE_REGION - - _APP_STORAGE_LINODE_BUCKET - - _APP_STORAGE_WASABI_ACCESS_KEY - - _APP_STORAGE_WASABI_SECRET - - _APP_STORAGE_WASABI_REGION - - _APP_STORAGE_WASABI_BUCKET - - DOCKERHUB_PULL_USERNAME - - DOCKERHUB_PULL_PASSWORD - appwrite-worker-mails: entrypoint: worker-mails <<: *x-logging @@ -529,6 +482,7 @@ services: # - smtp environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_OPENSSL_KEY_V1 - _APP_SYSTEM_EMAIL_NAME - _APP_SYSTEM_EMAIL_ADDRESS @@ -536,6 +490,7 @@ services: - _APP_REDIS_PORT - _APP_REDIS_USER - _APP_REDIS_PASS + - _APP_CONNECTIONS_QUEUE - _APP_SMTP_HOST - _APP_SMTP_PORT - _APP_SMTP_SECURE @@ -558,10 +513,12 @@ services: - redis environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_REDIS_USER - _APP_REDIS_PASS + - _APP_CONNECTIONS_QUEUE - _APP_SMS_PROVIDER - _APP_SMS_FROM - _APP_LOGGING_PROVIDER @@ -614,31 +571,67 @@ services: volumes: - ./app:/usr/src/code/app - ./src:/usr/src/code/src - #- ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database depends_on: - redis environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_DOMAIN - _APP_DOMAIN_TARGET - _APP_OPENSSL_KEY_V1 - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - _APP_DB_HOST - _APP_DB_PORT - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS + - _APP_CONNECTIONS_DB_CONSOLE + - _APP_CONNECTIONS_DB_PROJECT + - _APP_CONNECTIONS_CACHE - _APP_MAINTENANCE_INTERVAL - _APP_MAINTENANCE_RETENTION_EXECUTION - _APP_MAINTENANCE_RETENTION_CACHE - _APP_MAINTENANCE_RETENTION_ABUSE - _APP_MAINTENANCE_RETENTION_AUDIT - - _APP_MAINTENANCE_RETENTION_USAGE_HOURLY - _APP_MAINTENANCE_RETENTION_SCHEDULES + appwrite-usage-database: + entrypoint: + - usage + - --type=database + <<: *x-logging + container_name: appwrite-usage-database + image: appwrite-dev + networks: + - appwrite + volumes: + - ./app:/usr/src/code/app + - ./src:/usr/src/code/src + - ./dev:/usr/local/dev + depends_on: + - mariadb + environment: + - _APP_ENV + - _APP_WORKER_PER_CORE + - _APP_OPENSSL_KEY_V1 + - _APP_DB_HOST + - _APP_DB_PORT + - _APP_DB_SCHEMA + - _APP_DB_USER + - _APP_DB_PASS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS + - _APP_CONNECTIONS_DB_CONSOLE + - _APP_CONNECTIONS_DB_PROJECT + - _APP_CONNECTIONS_CACHEL + - _APP_USAGE_DATABASE_INTERVAL + - _APP_LOGGING_PROVIDER + - _APP_LOGGING_CONFIG appwrite-schedule: entrypoint: schedule @@ -651,13 +644,52 @@ services: - ./app:/usr/src/code/app - ./src:/usr/src/code/src depends_on: + - mariadb - redis environment: - _APP_ENV + - _APP_WORKER_PER_CORE - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_REDIS_USER - _APP_REDIS_PASS + - _APP_DB_HOST + - _APP_DB_PORT + - _APP_DB_SCHEMA + - _APP_DB_USER + - _APP_DB_PASS + - _APP_CONNECTIONS_DB_PROJECT + - _APP_CONNECTIONS_DB_CONSOLE + - _APP_CONNECTIONS_CACHE + - _APP_CONNECTIONS_QUEUE + - _APP_REGION + + openruntimes-executor: + container_name: openruntimes-executor + hostname: exc1 + <<: *x-logging + stop_signal: SIGINT + image: openruntimes/executor:0.1.4 + networks: + - appwrite + - openruntimes-runtimes + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - openruntimes-builds:/storage/builds:rw + - openruntimes-functions:/storage/functions:rw + - /tmp:/tmp:rw + environment: + - OPR_EXECUTOR_CONNECTION_STORAGE=$_APP_CONNECTIONS_STORAGE + - OPR_EXECUTOR_INACTIVE_TRESHOLD=$_APP_FUNCTIONS_INACTIVE_THRESHOLD + - OPR_EXECUTOR_NETWORK=$_APP_FUNCTIONS_RUNTIMES_NETWORK + - OPR_EXECUTOR_DOCKER_HUB_USERNAME=$_APP_DOCKER_HUB_USERNAME + - OPR_EXECUTOR_DOCKER_HUB_PASSWORD=$_APP_DOCKER_HUB_PASSWORD + - OPR_EXECUTOR_ENV=$_APP_ENV + - OPR_EXECUTOR_RUNTIMES=$_APP_FUNCTIONS_RUNTIMES + - OPR_EXECUTOR_SECRET=$_APP_EXECUTOR_SECRET + - OPR_EXECUTOR_LOGGING_PROVIDER=$_APP_LOGGING_PROVIDER + - OPR_EXECUTOR_LOGGING_CONFIG=$_APP_LOGGING_CONFIG + mariadb: image: mariadb:10.7 # fix issues when upgrading using: mysql_upgrade -u root -p @@ -674,8 +706,7 @@ services: - MYSQL_DATABASE=${_APP_DB_SCHEMA} - MYSQL_USER=${_APP_DB_USER} - MYSQL_PASSWORD=${_APP_DB_PASS} - command: 'mysqld --innodb-flush-method=fsync' # add ' --query_cache_size=0' for DB tests - # command: mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bu && mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bu + command: 'mysqld --innodb-flush-method=fsync --max_connections=${_APP_CONNECTIONS_MAX}' # smtp: # image: appwrite/smtp:1.2.0 @@ -785,8 +816,11 @@ services: networks: gateway: + name: gateway appwrite: - runtimes: + name: appwrite + openruntimes-runtimes: + name: openruntimes-runtimes volumes: appwrite-mariadb: @@ -797,5 +831,6 @@ volumes: appwrite-functions: appwrite-builds: appwrite-config: - appwrite-executor: - # appwrite-chronograf: + openruntimes-functions: + openruntimes-builds: + diff --git a/src/Appwrite/Platform/Services/Tasks.php b/src/Appwrite/Platform/Services/Tasks.php index 2968a66b9..f3bf1b9a3 100644 --- a/src/Appwrite/Platform/Services/Tasks.php +++ b/src/Appwrite/Platform/Services/Tasks.php @@ -23,7 +23,6 @@ class Tasks extends Service $this->type = self::TYPE_CLI; $this ->addAction(Version::getName(), new Version()) - ->addAction(Usage::getName(), new Usage()) ->addAction(Vars::getName(), new Vars()) ->addAction(SSL::getName(), new SSL()) ->addAction(Doctor::getName(), new Doctor()) From 205372519c132d575f74c2cae8a41c0bce59493f Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 11 Dec 2022 20:09:52 +0200 Subject: [PATCH 18/94] usage cleanup --- app/console | 2 +- docker-compose.yml | 35 ----------------------------------- 2 files changed, 1 insertion(+), 36 deletions(-) diff --git a/app/console b/app/console index c1ac63889..b1a81a390 160000 --- a/app/console +++ b/app/console @@ -1 +1 @@ -Subproject commit c1ac63889c0a97b280599355e526669bb207880a +Subproject commit b1a81a390a05746701651fca49e0d853f430677c diff --git a/docker-compose.yml b/docker-compose.yml index ce6cb4987..58a3212a4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -598,41 +598,6 @@ services: - _APP_MAINTENANCE_RETENTION_AUDIT - _APP_MAINTENANCE_RETENTION_SCHEDULES - appwrite-usage-database: - entrypoint: - - usage - - --type=database - <<: *x-logging - container_name: appwrite-usage-database - image: appwrite-dev - networks: - - appwrite - volumes: - - ./app:/usr/src/code/app - - ./src:/usr/src/code/src - - ./dev:/usr/local/dev - depends_on: - - mariadb - environment: - - _APP_ENV - - _APP_WORKER_PER_CORE - - _APP_OPENSSL_KEY_V1 - - _APP_DB_HOST - - _APP_DB_PORT - - _APP_DB_SCHEMA - - _APP_DB_USER - - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHEL - - _APP_USAGE_DATABASE_INTERVAL - - _APP_LOGGING_PROVIDER - - _APP_LOGGING_CONFIG - appwrite-schedule: entrypoint: schedule <<: *x-logging From d80bd75b6df14f8abad607c1db4c87aca5a34d8a Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 12 Dec 2022 09:54:53 +0200 Subject: [PATCH 19/94] usage cleanup --- app/controllers/api/project.php | 14 ++++++++------ app/controllers/shared/api.php | 1 + app/init.php | 3 ++- .../Utopia/Response/Model/UsageProject.php | 7 +++++++ 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index 5665780b9..cfcf8e958 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -29,6 +29,7 @@ App::get('/v1/project/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ + 'requests', 'network.inbound', 'network.outbound', 'executions', @@ -79,12 +80,13 @@ App::get('/v1/project/usage') $response->dynamic(new Document([ 'range' => $range, - 'network' => ($usage[$metrics[0]] + $usage[$metrics[1]]), - 'executions' => $usage[$metrics[2]], - 'documents' => $usage[$metrics[3]], - 'databases' => $usage[$metrics[4]], - 'users' => $usage[$metrics[5]], - 'storage' => $usage[$metrics[6]], + 'requests' => ($usage[$metrics[0]]), + 'network' => ($usage[$metrics[1]] + $usage[$metrics[2]]), + 'executions' => $usage[$metrics[3]], + 'documents' => $usage[$metrics[4]], + 'databases' => $usage[$metrics[5]], + 'users' => $usage[$metrics[6]], + 'storage' => $usage[$metrics[7]], 'buckets' => $usage[$metrics[8]], ]), Response::MODEL_USAGE_PROJECT); }); diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 243275197..c81568a70 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -64,6 +64,7 @@ $databaseListener = function (string $event, array $args, Document $project, Usa $queueForUsage->addMetric("teams", $value); // per project break; case $document->getCollection() === 'users': + var_dump($document); $queueForUsage->addMetric("users", $value); // per project break; case $document->getCollection() === 'sessions': // Todo sessions count offset issue diff --git a/app/init.php b/app/init.php index b253bae8d..0516d9d3e 100644 --- a/app/init.php +++ b/app/init.php @@ -39,6 +39,7 @@ use Appwrite\Network\Validator\URL; use Appwrite\OpenSSL\OpenSSL; use Appwrite\URL\URL as AppwriteURL; use Utopia\App; +use Utopia\Queue\Connection; use Utopia\Validator\Range; use Utopia\Validator\WhiteList; use Utopia\Database\ID; @@ -96,7 +97,7 @@ const APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT = 60; // Default maximum write rate pe const APP_KEY_ACCCESS = 24 * 60 * 60; // 24 hours const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours const APP_CACHE_BUSTER = 501; -const APP_VERSION_STABLE = '1.1.2'; +const APP_VERSION_STABLE = '1.1.1'; const APP_DATABASE_ATTRIBUTE_EMAIL = 'email'; const APP_DATABASE_ATTRIBUTE_ENUM = 'enum'; const APP_DATABASE_ATTRIBUTE_IP = 'ip'; diff --git a/src/Appwrite/Utopia/Response/Model/UsageProject.php b/src/Appwrite/Utopia/Response/Model/UsageProject.php index ae099785e..e37bc5928 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageProject.php +++ b/src/Appwrite/Utopia/Response/Model/UsageProject.php @@ -16,6 +16,13 @@ class UsageProject extends Model 'default' => '', 'example' => '30d', ]) + ->addRule('requests', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for number of requests.', + 'default' => [], + 'example' => [], + 'array' => true + ]) ->addRule('network', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for consumed bandwidth.', From 93c3b732914888d589116b2f6c14f995d6e99b2d Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 12 Dec 2022 10:16:09 +0200 Subject: [PATCH 20/94] usage cleanup --- app/controllers/shared/api.php | 16 ++++++++++++++-- docker-compose.yml | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index c81568a70..9f36ee427 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -64,8 +64,20 @@ $databaseListener = function (string $event, array $args, Document $project, Usa $queueForUsage->addMetric("teams", $value); // per project break; case $document->getCollection() === 'users': - var_dump($document); $queueForUsage->addMetric("users", $value); // per project + // sessions + if ($event === Database::EVENT_DOCUMENT_DELETE) { + $userSessions = (count($document->getAttribute('sessions'))); + $sessions = $dbForProject->getDocument('stats', md5("_inf_sessions")); + if (!empty($userSessions)) { + $dbForProject->decreaseDocumentAttribute( + 'stats', + $sessions->getId(), + 'value', + $userSessions + ); + } + } break; case $document->getCollection() === 'sessions': // Todo sessions count offset issue $queueForUsage->addMetric("sessions", $value); // per project @@ -353,7 +365,7 @@ App::init() $dbForProject ->on(Database::EVENT_DOCUMENT_CREATE, fn ($event, $args) => $databaseListener($event, $args, $project, $queueForUsage, $dbForProject)) - //->on(Database::EVENT_DOCUMENT_DELETE, fn ($event, Document $document, Document $collection) => $databaseListener($event, $document, $project, $queueForUsage, $dbForProject)) + ->on(Database::EVENT_DOCUMENT_DELETE, fn ($event, $args) => $databaseListener($event, $args, $project, $queueForUsage, $dbForProject)) ; $useCache = $route->getLabel('cache', false); diff --git a/docker-compose.yml b/docker-compose.yml index 58a3212a4..fd59054f2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -93,6 +93,7 @@ services: - ./public:/usr/src/code/public - ./src:/usr/src/code/src - ./dev:/usr/local/dev + - ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database depends_on: - mariadb - redis From 2f34c566e5c7a5361430589a2dfdc81fecb189cf Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 12 Dec 2022 11:37:10 +0200 Subject: [PATCH 21/94] addressing comments --- app/controllers/shared/api.php | 69 ++++++++++++++++------ app/worker.php | 2 +- app/workers/usage.php | 83 ++++++++++++--------------- docker-compose.yml | 4 +- src/Appwrite/Platform/Tasks/Usage.php | 50 ---------------- 5 files changed, 91 insertions(+), 117 deletions(-) delete mode 100644 src/Appwrite/Platform/Tasks/Usage.php diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 9f36ee427..8bf0be6f7 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -57,7 +57,11 @@ $databaseListener = function (string $event, array $args, Document $project, Usa if ($event === Database::EVENT_DOCUMENT_DELETE) { $value = -1; } - //var_dump($document->getCollection()); + + /** + * On Documents that tied by relations like functions>deployments>build || documents>collection>database || buckets>files + * When we remove a parent document we need to deduct his children aggregation from the project scope + */ switch (true) { case $document->getCollection() === 'teams': @@ -65,7 +69,8 @@ $databaseListener = function (string $event, array $args, Document $project, Usa break; case $document->getCollection() === 'users': $queueForUsage->addMetric("users", $value); // per project - // sessions + + // Project sessions deduction if ($event === Database::EVENT_DOCUMENT_DELETE) { $userSessions = (count($document->getAttribute('sessions'))); $sessions = $dbForProject->getDocument('stats', md5("_inf_sessions")); @@ -86,7 +91,8 @@ $databaseListener = function (string $event, array $args, Document $project, Usa $queueForUsage->addMetric("databases", $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { - // Collections + + //Project collections deduction $dbCollections = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".collections")); $projectCollections = $dbForProject->getDocument('stats', md5("_inf_collections")); if (!$dbCollections->isEmpty()) { @@ -97,7 +103,8 @@ $databaseListener = function (string $event, array $args, Document $project, Usa $dbCollections['value'] ); } - // Documents + + //Project documents deduction $dbDocuments = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".documents")); $projectDocuments = $dbForProject->getDocument('stats', md5("_inf_documents")); if (!$dbDocuments->isEmpty()) { @@ -117,7 +124,8 @@ $databaseListener = function (string $event, array $args, Document $project, Usa ; if ($event === Database::EVENT_DOCUMENT_DELETE) { - // Documents + + //Project documents deduction $dbDocuments = $dbForProject->getDocument('stats', md5("_inf_" . "{$document['databaseId']}" . ".documents")); $projectDocuments = $dbForProject->getDocument('stats', md5("_inf_documents")); if (!$dbDocuments->isEmpty()) { @@ -132,9 +140,6 @@ $databaseListener = function (string $event, array $args, Document $project, Usa break; case str_starts_with($document->getCollection(), 'database_') && str_contains($document->getCollection(), '_collection_'): //documents - var_dump($collection); - var_dump($document); - $queueForUsage ->addMetric("documents", $value) // per project ->addMetric("{$document->getAttribute('$databaseId')}" . ".documents", $value) // per database @@ -145,7 +150,8 @@ $databaseListener = function (string $event, array $args, Document $project, Usa $queueForUsage->addMetric("buckets", $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { - // bucket Files + + //Project files deduction $bucketFiles = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".files")); $projectFiles = $dbForProject->getDocument('stats', md5("_inf_files")); if (!$bucketFiles->isEmpty()) { @@ -156,7 +162,7 @@ $databaseListener = function (string $event, array $args, Document $project, Usa $bucketFiles['value'] ); } - // bucket Storage + //Project files storage deduction $bucketStorage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".files.storage")); $projectStorage = $dbForProject->getDocument('stats', md5("_inf_files.storage")); if (!$bucketStorage->isEmpty()) { @@ -181,7 +187,8 @@ $databaseListener = function (string $event, array $args, Document $project, Usa $queueForUsage->addMetric("functions", $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { - // Deployments Storage + + //Project deployments deduction $functionDeployments = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getId()}" . ".deployments")); $projectDeployments = $dbForProject->getDocument('stats', md5("_inf_deployments")); if (!$functionDeployments->isEmpty()) { @@ -192,7 +199,8 @@ $databaseListener = function (string $event, array $args, Document $project, Usa $functionDeployments['value'] ); } - // Deployments Storage + + //Project deployments storage deduction $functionDeploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getId()}" . ".deployments.storage")); $projectDeploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function.deployments.storage")); if (!$functionDeployments->isEmpty()) { @@ -204,9 +212,31 @@ $databaseListener = function (string $event, array $args, Document $project, Usa ); } - //TODO Missing solution for builds (functionId) + //Project builds deduction + $functionBuilds = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".builds")); + $projectBuilds = $dbForProject->getDocument('stats', md5("_inf_builds")); + if (!$functionBuilds->isEmpty()) { + $dbForProject->decreaseDocumentAttribute( + 'stats', + $projectBuilds->getId(), + 'value', + $functionBuilds['value'] + ); + } - // Executions + //Project builds storage deduction + $functionBuildsStorage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".builds.storage")); + $projectFunctionBuilds = $dbForProject->getDocument('stats', md5("_inf_builds.storage")); + if (!$functionBuildsStorage->isEmpty()) { + $dbForProject->decreaseDocumentAttribute( + 'stats', + $projectFunctionBuilds->getId(), + 'value', + $functionBuildsStorage['value'] + ); + } + + //Project executions deduction $functionExecutions = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".executions")); $projectExecutions = $dbForProject->getDocument('stats', md5("_inf_executions")); if (!$functionExecutions->isEmpty()) { @@ -217,7 +247,8 @@ $databaseListener = function (string $event, array $args, Document $project, Usa $functionExecutions['value'] ); } - // Executions Compute + + //Project executions compute deduction $functionExecutionsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".executions.compute")); $projectExecutionsCompute = $dbForProject->getDocument('stats', md5("_inf_executions.compute")); if (!$functionExecutionsCompute->isEmpty()) { @@ -238,12 +269,14 @@ $databaseListener = function (string $event, array $args, Document $project, Usa ->addMetric("{$document['resourceType']}" . "." . "{$document['resourceId']}" . ".deployments.storage", $document->getAttribute('size') * $value) // per function ; break; - case $document->getCollection() === 'builds': // todo needs to extract functionId + case $document->getCollection() === 'builds': + $deployment = $dbForProject->getDocument('deployments', $document->getAttribute('deploymentId')); // Todo temp fix + $queueForUsage ->addMetric("builds", $value) // per project ->addMetric("builds.storage", $document->getAttribute('size') * $value) // per project - ->addMetric("{$document['functionId']}" . ".builds", $value) // per function - ->addMetric("{$document['functionId']}" . ".builds.storage", $document->getAttribute('size') * $value) // per function + ->addMetric("{$deployment['resourceId']}" . ".builds", $value) // per function + ->addMetric("{$deployment['resourceId']}" . ".builds.storage", $document->getAttribute('size') * $value) // per function ; break; case $document->getCollection() === 'executions': diff --git a/app/worker.php b/app/worker.php index 93df36dd5..8151381d4 100644 --- a/app/worker.php +++ b/app/worker.php @@ -100,7 +100,7 @@ Server::setResource('pools', function ($register) { $pools = $register->get('pools'); $connection = $pools->get('queue')->pop()->getResource(); $workerNumber = swoole_cpu_num() * intval(App::getEnv('_APP_WORKER_PER_CORE', 6)); -$workerNumber = 1; + if (empty(App::getEnv('QUEUE'))) { throw new Exception('Please configure "QUEUE" environemnt variable.'); } diff --git a/app/workers/usage.php b/app/workers/usage.php index 844c33690..57e733aa2 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -43,60 +43,51 @@ $server->job() } }); + +$server->start(); $server ->workerStart() ->inject('register') ->inject('cache') ->inject('pools') ->action(function ($register, $cache, $pools) use ($periods, &$stats) { - Timer::tick(30000, function () use ($register, $cache, $pools, $periods, &$stats) { + Timer::tick(30000, function () use ($register, $cache, $pools, $periods, &$stats) { + $slice = array_slice($stats, 0, count($stats)); + array_splice($stats, 0, count($stats)); + foreach ($slice as $metric) { + foreach ($periods as $period => $format) { + $time = 'inf' === $period ? null : date($format, time()); + $id = \md5("{$time}_{$period}_{$metric['key']}"); + $dbForProject = new Database($pools->get($metric['database'])->pop()->getResource(), $cache); + $dbForProject->setNamespace('_' . $metric['projectInternalId']); - $slice = array_slice($stats, 0, count($stats)); - array_splice($stats, 0, count($stats)); - var_dump($slice); - foreach ($slice as $metric) { - foreach ($periods as $period => $format) { - $time = 'inf' === $period ? null : date($format, time()); - $id = \md5("{$time}_{$period}_{$metric['key']}"); - $dbForProject = new Database( - $pools - ->get($metric['database']) - ->pop() - ->getResource(), - $cache + try { + $document = $dbForProject->getDocument('stats', $id); + if ($document->isEmpty()) { + //console::log("{$period}, {$time}, {$metric['key']}={$metric['value']}"); + $dbForProject->createDocument('stats', new Document([ + '$id' => $id, + 'period' => $period, + 'time' => $time, + 'metric' => $metric['key'], + 'value' => $metric['value'], + 'region' => App::getEnv('_APP_REGION', 'default'), + ])); + } else { + //console::info("{$document->getAttribute('period')}, {$document->getAttribute('time')}, {$document->getAttribute('metric')} = {$value}"); + $dbForProject->increaseDocumentAttribute( + 'stats', + $document->getId(), + 'value', + $metric['value'] ); - - $dbForProject->setNamespace('_' . $metric['projectInternalId']); - - try { - $document = $dbForProject->getDocument('stats', $id); - if ($document->isEmpty()) { - //console::log("{$period}, {$time}, {$metric['key']}={$metric['value']}"); - $dbForProject->createDocument('stats', new Document([ - '$id' => $id, - 'period' => $period, - 'time' => $time, - 'metric' => $metric['key'], - 'value' => $metric['value'], - 'region' => App::getEnv('_APP_REGION', 'default'), - ])); - } else { - //console::info("{$document->getAttribute('period')}, {$document->getAttribute('time')}, {$document->getAttribute('metric')} = {$value}"); - $dbForProject->increaseDocumentAttribute( - 'stats', - $document->getId(), - 'value', - $metric['value'] - ); - } - } catch (\Exception $e) { - console::error($e->getMessage()); - } finally { - $pools->reclaim(); - } } + } catch (\Exception $e) { + console::error($e->getMessage()); + } finally { + $pools->reclaim(); } - }); + } + } + }); }); - -$server->start(); diff --git a/docker-compose.yml b/docker-compose.yml index fd59054f2..d3b1e5f8d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -93,7 +93,7 @@ services: - ./public:/usr/src/code/public - ./src:/usr/src/code/src - ./dev:/usr/local/dev - - ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database + #- ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database depends_on: - mariadb - redis @@ -535,7 +535,7 @@ services: volumes: - ./app:/usr/src/code/app - ./src:/usr/src/code/src - - ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database + #- ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database depends_on: - redis - mariadb diff --git a/src/Appwrite/Platform/Tasks/Usage.php b/src/Appwrite/Platform/Tasks/Usage.php deleted file mode 100644 index 7779ab6b6..000000000 --- a/src/Appwrite/Platform/Tasks/Usage.php +++ /dev/null @@ -1,50 +0,0 @@ -desc('Schedules syncing data from influxdb to Appwrite console db') - ->inject('dbForConsole') - ->inject('getProjectDB') - ->inject('logError') - // ->callback(fn ($dbForConsole, $influxDB, $register, $getProjectDB, $logError) => $this->action($dbForConsole, $influxDB, $register, $getProjectDB, $logError)) - ; - } - - public function action() - { - // Console::title('Usage Aggregation V1'); - // Console::success(APP_NAME . ' usage aggregation process v1 has started'); - - // $errorLogger = fn(Throwable $error, string $action = 'syncUsageStats') => $logError($error, "usage", $action); - - // $interval = (int) App::getEnv('_APP_USAGE_AGGREGATION_INTERVAL', '30'); // 30 seconds (by default) - // $region = App::getEnv('region', 'default'); - // $usage = new TimeSeries($region, $dbForConsole, $influxDB, $getProjectDB, $register, $errorLogger); - - // Console::loop(function () use ($interval, $usage) { - // $now = date('d-m-Y H:i:s', time()); - // Console::info("[{$now}] Aggregating Timeseries Usage data every {$interval} seconds"); - // $loopStart = microtime(true); - - // $usage->collect(); - - // $loopTook = microtime(true) - $loopStart; - // $now = date('d-m-Y H:i:s', time()); - // Console::info("[{$now}] Aggregation took {$loopTook} seconds"); - // }, $interval); - } -} From 141d55bd361e53d79df8f78c8c4e6ad0b85fc64c Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 13 Dec 2022 09:35:05 +0200 Subject: [PATCH 22/94] build+functions worker --- app/config/collections.php | 39 ++++++++++++++++- app/controllers/api/functions.php | 13 +++--- app/controllers/shared/api.php | 26 +++++------ app/init.php | 4 +- app/worker.php | 15 +++++-- app/workers/builds.php | 18 +++++++- app/workers/functions.php | 24 ++++++++--- app/workers/usage.php | 43 ++++++++++++++----- docker-compose.yml | 3 +- src/Appwrite/Resque/Worker.php | 31 ++++++++++--- .../Utopia/Response/Model/UsageFunction.php | 37 ++++++---------- .../Utopia/Response/Model/UsageFunctions.php | 4 +- src/Executor/Executor.php | 1 - 13 files changed, 177 insertions(+), 81 deletions(-) diff --git a/app/config/collections.php b/app/config/collections.php index 9f63830f7..06a267ed1 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -3174,7 +3174,44 @@ $collections = [ ], ], ], - + 'statsLogger' => [ + '$collection' => ID::custom(Database::METADATA), + '$id' => ID::custom('statsLogger'), + 'name' => 'StatsLogger', + 'attributes' => [ + [ + '$id' => ID::custom('time'), + 'type' => Database::VAR_DATETIME, + 'format' => '', + 'size' => 0, + 'signed' => false, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => ['datetime'], + ], + [ + '$id' => ID::custom('metrics'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 1024, + 'signed' => true, + 'required' => false, + 'default' => [], + 'array' => false, + 'filters' => ['json'], + ], + ], + 'indexes' => [ + [ + '$id' => ID::custom('_key_time'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['time'], + 'lengths' => [], + 'orders' => [Database::ORDER_DESC], + ], + ], + ], 'realtime' => [ '$collection' => ID::custom(Database::METADATA), '$id' => ID::custom('realtime'), diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 0e184b4cd..115276cc6 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1373,10 +1373,10 @@ App::get('/v1/functions/:functionId/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - 'function.' . $function->getId() . '.deployments', - 'function.' . $function->getId() . '.deployments.storage', + 'functions.' . $function->getId() . '.deployments', + 'functions.' . $function->getId() . '.deployments.storage', $function->getId() . '.builds', - $function->getId() . '.builds.storage', + $function->getId() . '.builds.compute', $function->getId() . '.executions', $function->getId() . '.executions.compute', ]; @@ -1424,7 +1424,7 @@ App::get('/v1/functions/:functionId/usage') 'deployments' => $usage[$metrics[0]], 'deploymentsStorage' => $usage[$metrics[1]], 'builds' => $usage[$metrics[2]], - 'buildsStorage' => $usage[$metrics[3]], + 'buildsCompute' => $usage[$metrics[3]], 'executions' => $usage[$metrics[4]], 'executionsCompute' => $usage[$metrics[5]], ]), Response::MODEL_USAGE_FUNCTION); @@ -1453,7 +1453,7 @@ App::get('/v1/functions/usage') 'deployments', 'deployments.storage', 'builds', - 'builds.storage', + 'builds.compute', 'executions', 'executions.compute', ]; @@ -1495,14 +1495,13 @@ App::get('/v1/functions/usage') } $usage[$metric] = array_reverse($usage[$metric]); } - $response->dynamic(new Document([ 'range' => $range, 'functions' => $usage[$metrics[0]], 'deployments' => $usage[$metrics[1]], 'deploymentsStorage' => $usage[$metrics[2]], 'builds' => $usage[$metrics[3]], - 'buildsStorage' => $usage[$metrics[4]], + 'buildsCompute' => $usage[$metrics[4]], 'executions' => $usage[$metrics[5]], 'executionsCompute' => $usage[$metrics[6]], ]), Response::MODEL_USAGE_FUNCTIONS); diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 8bf0be6f7..6da2d2bb2 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -62,14 +62,13 @@ $databaseListener = function (string $event, array $args, Document $project, Usa * On Documents that tied by relations like functions>deployments>build || documents>collection>database || buckets>files * When we remove a parent document we need to deduct his children aggregation from the project scope */ - + var_dump($document->getCollection()); switch (true) { case $document->getCollection() === 'teams': $queueForUsage->addMetric("teams", $value); // per project break; case $document->getCollection() === 'users': $queueForUsage->addMetric("users", $value); // per project - // Project sessions deduction if ($event === Database::EVENT_DOCUMENT_DELETE) { $userSessions = (count($document->getAttribute('sessions'))); @@ -84,14 +83,13 @@ $databaseListener = function (string $event, array $args, Document $project, Usa } } break; - case $document->getCollection() === 'sessions': // Todo sessions count offset issue + case $document->getCollection() === 'sessions': // sessions Todo sessions count offset issue $queueForUsage->addMetric("sessions", $value); // per project break; - case $document->getCollection() === 'databases': + case $document->getCollection() === 'databases': // databases $queueForUsage->addMetric("databases", $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { - //Project collections deduction $dbCollections = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".collections")); $projectCollections = $dbForProject->getDocument('stats', md5("_inf_collections")); @@ -117,14 +115,13 @@ $databaseListener = function (string $event, array $args, Document $project, Usa } } break; - case $document->getCollection() === 'database_' . $document['$internalId']: // collections + case str_starts_with($document->getCollection(), 'database_') && !str_contains($document->getCollection(), 'collection'): //collections $queueForUsage - ->addMetric("collections", $value) // per project - ->addMetric("{$document['databaseId']}" . ".collections", $value) // per database - ; + ->addMetric("collections", $value) // per project + ->addMetric("{$document['databaseId']}" . ".collections", $value) // per database + ; if ($event === Database::EVENT_DOCUMENT_DELETE) { - //Project documents deduction $dbDocuments = $dbForProject->getDocument('stats', md5("_inf_" . "{$document['databaseId']}" . ".documents")); $projectDocuments = $dbForProject->getDocument('stats', md5("_inf_documents")); @@ -150,7 +147,6 @@ $databaseListener = function (string $event, array $args, Document $project, Usa $queueForUsage->addMetric("buckets", $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { - //Project files deduction $bucketFiles = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".files")); $projectFiles = $dbForProject->getDocument('stats', md5("_inf_files")); @@ -175,7 +171,7 @@ $databaseListener = function (string $event, array $args, Document $project, Usa } } break; - case $document->getCollection() === 'bucket_' . $document['$internalId']: // files + case str_starts_with($document->getCollection(), 'bucket_'): // files $queueForUsage ->addMetric("files", $value) // per project ->addMetric("files.storage", $document->getAttribute('sizeOriginal') * $value) // per project @@ -187,7 +183,6 @@ $databaseListener = function (string $event, array $args, Document $project, Usa $queueForUsage->addMetric("functions", $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { - //Project deployments deduction $functionDeployments = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getId()}" . ".deployments")); $projectDeployments = $dbForProject->getDocument('stats', md5("_inf_deployments")); @@ -274,9 +269,9 @@ $databaseListener = function (string $event, array $args, Document $project, Usa $queueForUsage ->addMetric("builds", $value) // per project - ->addMetric("builds.storage", $document->getAttribute('size') * $value) // per project + ->addMetric("builds.compute", $document->getAttribute('duration') * $value) // per project ->addMetric("{$deployment['resourceId']}" . ".builds", $value) // per function - ->addMetric("{$deployment['resourceId']}" . ".builds.storage", $document->getAttribute('size') * $value) // per function + ->addMetric("{$deployment['resourceId']}" . ".builds.compute", $document->getAttribute('duration') * $value) // per function ; break; case $document->getCollection() === 'executions': @@ -645,4 +640,5 @@ App::shutdown() ->addMetric("network.outbound", $response->getSize()) ->trigger(); } + var_dump(1); }); diff --git a/app/init.php b/app/init.php index 0516d9d3e..395144206 100644 --- a/app/init.php +++ b/app/init.php @@ -39,7 +39,6 @@ use Appwrite\Network\Validator\URL; use Appwrite\OpenSSL\OpenSSL; use Appwrite\URL\URL as AppwriteURL; use Utopia\App; -use Utopia\Queue\Connection; use Utopia\Validator\Range; use Utopia\Validator\WhiteList; use Utopia\Database\ID; @@ -74,7 +73,10 @@ use Appwrite\Event\Func; use MaxMind\Db\Reader; use PHPMailer\PHPMailer\PHPMailer; use Swoole\Database\PDOProxy; +use Utopia\CLI\Console; use Utopia\Queue; +use Utopia\Queue\Connection; +use Utopia\Storage\Storage; const APP_NAME = 'Appwrite'; const APP_DOMAIN = 'appwrite.io'; diff --git a/app/worker.php b/app/worker.php index 8151381d4..78671d731 100644 --- a/app/worker.php +++ b/app/worker.php @@ -3,6 +3,7 @@ require_once __DIR__ . '/init.php'; use Appwrite\Event\Func; +use Appwrite\Event\Usage; use Swoole\Runtime; use Utopia\App; use Utopia\Cache\Adapter\Sharding; @@ -85,12 +86,18 @@ Server::setResource('queueForFunctions', function (Registry $register) { ); }, ['register']); -Server::setResource('logger', function ($register) { - return $register->get('logger'); +Server::setResource('queueForUsage', function (Registry $register) { + $pools = $register->get('pools'); + return new Usage( + $pools + ->get('queue') + ->pop() + ->getResource() + ); }, ['register']); -Server::setResource('statsd', function ($register) { - return $register->get('statsd'); +Server::setResource('logger', function ($register) { + return $register->get('logger'); }, ['register']); Server::setResource('pools', function ($register) { diff --git a/app/workers/builds.php b/app/workers/builds.php index 7754e3ec6..ff8bafae5 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -56,6 +56,11 @@ class BuildsV1 extends Worker } } + /** + * @throws \Utopia\Database\Exception\Authorization + * @throws Throwable + * @throws \Utopia\Database\Exception\Structure + */ protected function buildDeployment(Document $project, Document $function, Document $deployment) { global $register; @@ -169,8 +174,8 @@ class BuildsV1 extends Worker try { $response = $this->executor->createRuntime( - projectId: $project->getId(), deploymentId: $deployment->getId(), + projectId: $project->getId(), source: $source, image: $runtime['image'], remove: true, @@ -248,6 +253,17 @@ class BuildsV1 extends Worker roles: $target['roles'] ); } + + /** Trigger usage queue */ + $this + ->getUsageQueue() + ->setProject($project) + ->addMetric("builds", 1) // per project + ->addMetric("builds.compute", $build->getAttribute('duration')) // per project + ->addMetric("{$function->getId()}" . ".builds", 1) // per function + ->addMetric("{$function->getId()}" . ".builds.compute", $build->getAttribute('duration')) // per function + ->trigger() + ; } public function shutdown(): void diff --git a/app/workers/functions.php b/app/workers/functions.php index 132241f60..d90a3438e 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -2,12 +2,12 @@ require_once __DIR__ . '/../worker.php'; +use Appwrite\Event\Usage; use Utopia\Queue\Message; use Appwrite\Event\Event; use Appwrite\Event\Func; use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Utopia\Response\Model\Execution; -use Domnikl\Statsd\Client; use Executor\Executor; use Utopia\App; use Utopia\CLI\Console; @@ -28,7 +28,7 @@ Server::setResource('execute', function () { return function ( Func $queueForFunctions, Database $dbForProject, - Client $statsd, + Usage $queueForUsage, Document $project, Document $function, string $trigger, @@ -39,6 +39,7 @@ Server::setResource('execute', function () { string $eventData = null, string $executionId = null, ) { + $user ??= new Document(); $functionId = $function->getId(); $deploymentId = $function->getAttribute('deployment', ''); @@ -201,6 +202,15 @@ Server::setResource('execute', function () { channels: $target['channels'], roles: $target['roles'] ); + + /** Trigger usage queue */ + $queueForUsage + ->setProject($project) + ->addMetric('executions', 1) // per project + ->addMetric('executions.compute', $execution->getAttribute('duration'))// per project + ->addMetric("{$function->getId()}" . ".executions", 1) + ->addMetric("{$function->getId()}" . ".executions.compute", $execution->getAttribute('duration')) + ->trigger(); }; }); @@ -208,9 +218,9 @@ $server->job() ->inject('message') ->inject('dbForProject') ->inject('queueForFunctions') - ->inject('statsd') + ->inject('queueForUsage') ->inject('execute') - ->action(function (Message $message, Database $dbForProject, Func $queueForFunctions, Client $statsd, callable $execute) { + ->action(function (Message $message, Database $dbForProject, Func $queueForFunctions, Usage $queueForUsage, callable $execute) { $payload = $message->getPayload() ?? []; if (empty($payload)) { @@ -253,7 +263,7 @@ $server->job() } Console::success('Iterating function: ' . $function->getAttribute('name')); $execute( - statsd: $statsd, + queueForUsage: $queueForUsage, dbForProject: $dbForProject, project: $project, function: $function, @@ -292,7 +302,7 @@ $server->job() data: $data, user: $user, jwt: $jwt, - statsd: $statsd, + queueForUsage: $queueForUsage, ); break; case 'schedule': @@ -308,7 +318,7 @@ $server->job() data: null, user: null, jwt: null, - statsd: $statsd, + queueForUsage: $queueForUsage, ); break; } diff --git a/app/workers/usage.php b/app/workers/usage.php index 57e733aa2..662c73973 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -2,10 +2,13 @@ require_once __DIR__ . '/../worker.php'; +use Appwrite\Extend\Exception; use Swoole\Timer; use Utopia\App; use Utopia\Database\Database; +use Utopia\Database\DateTime; use Utopia\Database\Document; +use Utopia\Database\Exception\Duplicate; use Utopia\Database\Validator\Authorization; use Utopia\Queue\Message; use Utopia\CLI\Console; @@ -43,8 +46,6 @@ $server->job() } }); - -$server->start(); $server ->workerStart() ->inject('register') @@ -54,17 +55,21 @@ $server Timer::tick(30000, function () use ($register, $cache, $pools, $periods, &$stats) { $slice = array_slice($stats, 0, count($stats)); array_splice($stats, 0, count($stats)); + $log = []; foreach ($slice as $metric) { + $dbForProject = new Database( + $pools + ->get($metric['database']) + ->pop() + ->getResource(), + $cache + ); + $dbForProject->setNamespace('_' . $metric['projectInternalId']); foreach ($periods as $period => $format) { $time = 'inf' === $period ? null : date($format, time()); $id = \md5("{$time}_{$period}_{$metric['key']}"); - $dbForProject = new Database($pools->get($metric['database'])->pop()->getResource(), $cache); - $dbForProject->setNamespace('_' . $metric['projectInternalId']); - try { - $document = $dbForProject->getDocument('stats', $id); - if ($document->isEmpty()) { - //console::log("{$period}, {$time}, {$metric['key']}={$metric['value']}"); + try { $dbForProject->createDocument('stats', new Document([ '$id' => $id, 'period' => $period, @@ -73,21 +78,37 @@ $server 'value' => $metric['value'], 'region' => App::getEnv('_APP_REGION', 'default'), ])); - } else { - //console::info("{$document->getAttribute('period')}, {$document->getAttribute('time')}, {$document->getAttribute('metric')} = {$value}"); + } catch (Duplicate $th) { $dbForProject->increaseDocumentAttribute( 'stats', - $document->getId(), + $id, 'value', $metric['value'] ); } + + $log[] = [ + 'id' => $id, + 'period' => $period, + 'time' => $time, + 'metric' => $metric['key'], + 'value' => $metric['value'], + 'region' => App::getEnv('_APP_REGION', 'default'), + ]; } catch (\Exception $e) { console::error($e->getMessage()); } finally { $pools->reclaim(); } } + + if (!empty($metrics)) { + $dbForProject->createDocument('statsLogger', new Document([ + 'time' => DateTime::now(), + 'metrics' => $log, + ])); + } } }); }); +$server->start(); diff --git a/docker-compose.yml b/docker-compose.yml index d3b1e5f8d..557c52ea7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -93,7 +93,7 @@ services: - ./public:/usr/src/code/public - ./src:/usr/src/code/src - ./dev:/usr/local/dev - #- ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database + - ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database depends_on: - mariadb - redis @@ -390,6 +390,7 @@ services: - _APP_CONNECTIONS_QUEUE - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG + - _APP_CONNECTIONS_STORAGE appwrite-worker-certificates: entrypoint: worker-certificates diff --git a/src/Appwrite/Resque/Worker.php b/src/Appwrite/Resque/Worker.php index e96c24d75..50ea7d3ec 100644 --- a/src/Appwrite/Resque/Worker.php +++ b/src/Appwrite/Resque/Worker.php @@ -2,6 +2,8 @@ namespace Appwrite\Resque; +use Appwrite\Event\Func; +use Appwrite\Event\Usage; use Exception; use Utopia\App; use Utopia\Cache\Cache; @@ -9,6 +11,8 @@ use Utopia\Config\Config; use Utopia\Cache\Adapter\Sharding; use Utopia\CLI\Console; use Utopia\Database\Database; +use Utopia\Pools\Group; +use Utopia\Queue\Connection; use Utopia\Storage\Device; use Utopia\Storage\Device\Local; use Utopia\Storage\Device\DOSpaces; @@ -141,7 +145,7 @@ abstract class Worker global $register; try { - $pools = $register->get('pools'); /** @var \Utopia\Pools\Group $pools */ + $pools = $register->get('pools'); /** @var Group $pools */ $pools->reclaim(); $this->shutdown(); @@ -176,7 +180,7 @@ abstract class Worker { global $register; - $pools = $register->get('pools'); /** @var \Utopia\Pools\Group $pools */ + $pools = $register->get('pools'); /** @var Group $pools */ if ($project->isEmpty() || $project->getId() === 'console') { return $this->getConsoleDB(); @@ -213,7 +217,7 @@ abstract class Worker { global $register; - $pools = $register->get('pools'); /** @var \Utopia\Pools\Group $pools */ + $pools = $register->get('pools'); /** @var Group $pools */ $dbAdapter = $pools ->get('console') @@ -237,7 +241,7 @@ abstract class Worker { global $register; - $pools = $register->get('pools'); /** @var \Utopia\Pools\Group $pools */ + $pools = $register->get('pools'); /** @var Group $pools */ $list = Config::getParam('pools-cache', []); $adapters = []; @@ -253,6 +257,24 @@ abstract class Worker return new Cache(new Sharding($adapters)); } + /** + * Get usage queue + * @return Usage + * @throws Exception + */ + protected function getUsageQueue(): Usage + { + global $register; + + $pools = $register->get('pools'); /** @var Group $pools */ + $queue = $pools + ->get('queue') + ->pop() + ->getResource(); + + return new Usage($queue); + } + /** * Get Functions Storage Device * @param string $projectId of the project @@ -291,7 +313,6 @@ abstract class Worker public function getDevice($root): Device { $connection = App::getEnv('_APP_CONNECTIONS_STORAGE', ''); - $acl = 'private'; $device = Storage::DEVICE_LOCAL; $accessKey = ''; diff --git a/src/Appwrite/Utopia/Response/Model/UsageFunction.php b/src/Appwrite/Utopia/Response/Model/UsageFunction.php index 58d76bbf4..410db7333 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageFunction.php +++ b/src/Appwrite/Utopia/Response/Model/UsageFunction.php @@ -16,58 +16,45 @@ class UsageFunction extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('executionsTotal', [ + ->addRule('deployments', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for number of function executions.', + 'description' => 'Aggregated stats for number of function deployments.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('executionsFailure', [ + ->addRule('deploymentsStorage', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function execution failures.', + 'description' => 'Aggregated stats for function deployments storage.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('executionsSuccess', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function execution successes.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('executionsTime', [ - 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function execution duration.', - 'default' => [], - 'example' => [], - 'array' => true - ]) - ->addRule('buildsTotal', [ + ->addRule('builds', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of function builds.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('buildsFailure', [ + ->addRule('buildsCompute', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function build failures.', + 'description' => 'Aggregated stats for function build compute.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('buildsSuccess', [ + ->addRule('executions', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function build successes.', + 'description' => 'Aggregated stats for number of function executions.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('buildsTime', [ + + ->addRule('executionsCompute', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function build duration.', + 'description' => 'Aggregated stats for function execution compute.', 'default' => [], 'example' => [], 'array' => true diff --git a/src/Appwrite/Utopia/Response/Model/UsageFunctions.php b/src/Appwrite/Utopia/Response/Model/UsageFunctions.php index b3bfa8629..85ab2111e 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageFunctions.php +++ b/src/Appwrite/Utopia/Response/Model/UsageFunctions.php @@ -44,9 +44,9 @@ class UsageFunctions extends Model 'example' => [], 'array' => true ]) - ->addRule('buildsStorage', [ + ->addRule('buildsCompute', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated stats for function build storage.', + 'description' => 'Aggregated stats for function build compute.', 'default' => [], 'example' => [], 'array' => true diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index 43b2228e1..dfb4ccf46 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -133,7 +133,6 @@ class Executor 'variables' => $variables, 'payload' => $payload, 'timeout' => $timeout, - 'image' => $image, 'source' => $source, 'entrypoint' => $entrypoint, From 06aee565a8bee2387db59421931198a36512306c Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 13 Dec 2022 13:46:53 +0200 Subject: [PATCH 23/94] addressing comments --- .env | 2 +- app/config/collections.php | 2 +- app/init.php | 2 +- app/workers/usage.php | 18 ++++++++---------- src/Appwrite/Resque/Worker.php | 2 -- src/Executor/Executor.php | 2 +- 6 files changed, 12 insertions(+), 16 deletions(-) diff --git a/.env b/.env index 71d58e8e3..6897e4e2b 100644 --- a/.env +++ b/.env @@ -51,7 +51,7 @@ _APP_FUNCTIONS_CPUS=1 _APP_FUNCTIONS_MEMORY=512 _APP_FUNCTIONS_INACTIVE_THRESHOLD=600 _APP_FUNCTIONS_MAINTENANCE_INTERVAL=600 -_APP_FUNCTIONS_RUNTIMES_NETWORK=runtimes +_APP_FUNCTIONS_RUNTIMES_NETWORK=openruntimes-runtimes _APP_EXECUTOR_SECRET=your-secret-key _APP_EXECUTOR_HOST=http://exc1/v1 _APP_FUNCTIONS_RUNTIMES= diff --git a/app/config/collections.php b/app/config/collections.php index 06a267ed1..4d1824d08 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -3194,7 +3194,7 @@ $collections = [ '$id' => ID::custom('metrics'), 'type' => Database::VAR_STRING, 'format' => '', - 'size' => 1024, + 'size' => 5012, 'signed' => true, 'required' => false, 'default' => [], diff --git a/app/init.php b/app/init.php index 395144206..853710782 100644 --- a/app/init.php +++ b/app/init.php @@ -99,7 +99,7 @@ const APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT = 60; // Default maximum write rate pe const APP_KEY_ACCCESS = 24 * 60 * 60; // 24 hours const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours const APP_CACHE_BUSTER = 501; -const APP_VERSION_STABLE = '1.1.1'; +const APP_VERSION_STABLE = '1.1.2'; const APP_DATABASE_ATTRIBUTE_EMAIL = 'email'; const APP_DATABASE_ATTRIBUTE_ENUM = 'enum'; const APP_DATABASE_ATTRIBUTE_IP = 'ip'; diff --git a/app/workers/usage.php b/app/workers/usage.php index 662c73973..7fd2f1ccc 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -2,7 +2,6 @@ require_once __DIR__ . '/../worker.php'; -use Appwrite\Extend\Exception; use Swoole\Timer; use Utopia\App; use Utopia\Database\Database; @@ -41,7 +40,6 @@ $server->job() continue; } - $stats[$uniq]['value'] += $metric['value']; } }); @@ -71,11 +69,11 @@ $server try { try { $dbForProject->createDocument('stats', new Document([ - '$id' => $id, + '$id' => $id, 'period' => $period, - 'time' => $time, + 'time' => $time, 'metric' => $metric['key'], - 'value' => $metric['value'], + 'value' => $metric['value'], 'region' => App::getEnv('_APP_REGION', 'default'), ])); } catch (Duplicate $th) { @@ -88,11 +86,11 @@ $server } $log[] = [ - 'id' => $id, + 'id' => $id, 'period' => $period, - 'time' => $time, + 'time' => $time, 'metric' => $metric['key'], - 'value' => $metric['value'], + 'value' => $metric['value'], 'region' => App::getEnv('_APP_REGION', 'default'), ]; } catch (\Exception $e) { @@ -102,9 +100,9 @@ $server } } - if (!empty($metrics)) { + if (!empty($log)) { $dbForProject->createDocument('statsLogger', new Document([ - 'time' => DateTime::now(), + 'time' => DateTime::now(), 'metrics' => $log, ])); } diff --git a/src/Appwrite/Resque/Worker.php b/src/Appwrite/Resque/Worker.php index 50ea7d3ec..8d0860ab1 100644 --- a/src/Appwrite/Resque/Worker.php +++ b/src/Appwrite/Resque/Worker.php @@ -2,7 +2,6 @@ namespace Appwrite\Resque; -use Appwrite\Event\Func; use Appwrite\Event\Usage; use Exception; use Utopia\App; @@ -12,7 +11,6 @@ use Utopia\Cache\Adapter\Sharding; use Utopia\CLI\Console; use Utopia\Database\Database; use Utopia\Pools\Group; -use Utopia\Queue\Connection; use Utopia\Storage\Device; use Utopia\Storage\Device\Local; use Utopia\Storage\Device\DOSpaces; diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index dfb4ccf46..bd49e5cf2 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -4,7 +4,6 @@ namespace Executor; use Exception; use Utopia\App; -use Utopia\CLI\Console; class Executor { @@ -133,6 +132,7 @@ class Executor 'variables' => $variables, 'payload' => $payload, 'timeout' => $timeout, + 'image' => $image, 'source' => $source, 'entrypoint' => $entrypoint, From 961c4088853aca34c94f098367d1f269f43030e1 Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 14 Dec 2022 09:34:04 +0200 Subject: [PATCH 24/94] metric negative / positive values in worker --- app/config/collections.php | 2 +- app/controllers/api/project.php | 4 +- app/controllers/api/storage.php | 4 +- app/controllers/api/users.php | 2 +- app/controllers/shared/api.php | 12 ++--- app/workers/usage.php | 37 +++++++++++---- tests/e2e/General/UsageTest.php | 81 +++++++++++++++------------------ 7 files changed, 74 insertions(+), 68 deletions(-) diff --git a/app/config/collections.php b/app/config/collections.php index 4d1824d08..0af568dd8 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -3121,7 +3121,7 @@ $collections = [ 'type' => Database::VAR_INTEGER, 'format' => '', 'size' => 8, - 'signed' => false, + 'signed' => true, 'required' => true, 'default' => null, 'array' => false, diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index cfcf8e958..dbec9a1e3 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -29,7 +29,7 @@ App::get('/v1/project/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - 'requests', + 'network.requests', 'network.inbound', 'network.outbound', 'executions', @@ -75,7 +75,7 @@ App::get('/v1/project/usage') 'date' => $formatDate, ]; } - $usage[$metric] = array_reverse($usage[$metric]); + //$usage[$metric] = array_reverse($usage[$metric]); } $response->dynamic(new Document([ diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index b32f006ab..c57c42e5d 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -1478,7 +1478,7 @@ App::get('/v1/storage/:bucketId/usage') 'date' => $formatDate, ]; } - $usage[$metric] = array_reverse($usage[$metric]); + //$usage[$metric] = array_reverse($usage[$metric]); } $response->dynamic(new Document([ @@ -1547,7 +1547,7 @@ App::get('/v1/storage/usage') 'date' => $formatDate, ]; } - $usage[$metric] = array_reverse($usage[$metric]); + //$usage[$metric] = array_reverse($usage[$metric]); } $response->dynamic(new Document([ diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 624eaca51..44ef69008 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -1128,7 +1128,7 @@ App::get('/v1/users/usage') 'date' => $formatDate, ]; } - $usage[$metric] = array_reverse($usage[$metric]); + //$usage[$metric] = array_reverse($usage[$metric]); } $response->dynamic(new Document([ diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 6da2d2bb2..ffd39fc5b 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -62,7 +62,7 @@ $databaseListener = function (string $event, array $args, Document $project, Usa * On Documents that tied by relations like functions>deployments>build || documents>collection>database || buckets>files * When we remove a parent document we need to deduct his children aggregation from the project scope */ - var_dump($document->getCollection()); + //var_dump($document->getCollection()); switch (true) { case $document->getCollection() === 'teams': $queueForUsage->addMetric("teams", $value); // per project @@ -145,7 +145,6 @@ $databaseListener = function (string $event, array $args, Document $project, Usa break; case $document->getCollection() === 'buckets': $queueForUsage->addMetric("buckets", $value); // per project - if ($event === Database::EVENT_DOCUMENT_DELETE) { //Project files deduction $bucketFiles = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".files")); @@ -594,10 +593,10 @@ App::shutdown() $key = md5($request->getURI() . implode('*', $request->getParams())) . '*' . APP_CACHE_BUSTER; $data = json_encode([ - 'resourceType' => $resourceType, - 'resource' => $resource, - 'contentType' => $response->getContentType(), - 'payload' => base64_encode($data['payload']), + 'resourceType' => $resourceType, + 'resource' => $resource, + 'contentType' => $response->getContentType(), + 'payload' => base64_encode($data['payload']), ]) ; $signature = md5($data); @@ -640,5 +639,4 @@ App::shutdown() ->addMetric("network.outbound", $response->getSize()) ->trigger(); } - var_dump(1); }); diff --git a/app/workers/usage.php b/app/workers/usage.php index 7fd2f1ccc..f2e4bf3d8 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -19,6 +19,7 @@ $stats = []; $periods['1h'] = 'Y-m-d H:00'; $periods['1d'] = 'Y-m-d 00:00'; +$periods['1m'] = 'Y-m-00 00:00'; $periods['inf'] = '0000-00-00 00:00'; $server->job() @@ -50,11 +51,17 @@ $server ->inject('cache') ->inject('pools') ->action(function ($register, $cache, $pools) use ($periods, &$stats) { - Timer::tick(30000, function () use ($register, $cache, $pools, $periods, &$stats) { + Timer::tick(3000, function () use ($register, $cache, $pools, $periods, &$stats) { $slice = array_slice($stats, 0, count($stats)); array_splice($stats, 0, count($stats)); + //var_dump($slice); $log = []; + foreach ($slice as $metric) { + if ($metric['value'] == 0) { + continue; + } + var_dump($metric['value']); $dbForProject = new Database( $pools ->get($metric['database']) @@ -62,6 +69,7 @@ $server ->getResource(), $cache ); + $dbForProject->setNamespace('_' . $metric['projectInternalId']); foreach ($periods as $period => $format) { $time = 'inf' === $period ? null : date($format, time()); @@ -69,20 +77,29 @@ $server try { try { $dbForProject->createDocument('stats', new Document([ - '$id' => $id, + '$id' => $id, 'period' => $period, - 'time' => $time, + 'time' => $time, 'metric' => $metric['key'], - 'value' => $metric['value'], + 'value' => $metric['value'], 'region' => App::getEnv('_APP_REGION', 'default'), ])); } catch (Duplicate $th) { - $dbForProject->increaseDocumentAttribute( - 'stats', - $id, - 'value', - $metric['value'] - ); + if ($metric['value'] < 0) { + $dbForProject->decreaseDocumentAttribute( + 'stats', + $id, + 'value', + abs($metric['value']) + ); + } else { + $dbForProject->increaseDocumentAttribute( + 'stats', + $id, + 'value', + $metric['value'] + ); + } } $log[] = [ diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index 4dddaf153..e06b6d5f5 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -19,6 +19,8 @@ class UsageTest extends Scope use SideServer; use FunctionsBase; + const WAIT = 5; + protected string $projectId; protected function setUp(): void @@ -26,6 +28,8 @@ class UsageTest extends Scope parent::setUp(); } + + protected static string $formatTz = 'Y-m-d\TH:i:s.vP'; protected function validateDates(array $metrics): void @@ -55,6 +59,7 @@ class UsageTest extends Scope 'password' => $password, 'name' => $name, ]); + $this->assertEquals($email, $res['body']['email']); $this->assertNotEmpty($res['body']['$id']); $usersCount++; @@ -85,7 +90,7 @@ class UsageTest extends Scope #[Retry(count: 1)] public function testUsersStats(array $data): array { - sleep(20); + sleep(self::WAIT); $projectId = $data['projectId']; $headers = $data['headers']; @@ -103,29 +108,30 @@ class UsageTest extends Scope $res = $this->client->call(Client::METHOD_GET, '/project/usage?range=30d', $headers); $res = $res['body']; - + $this->assertEquals('30d', $res['range']); $this->assertEquals(9, count($res)); $this->assertEquals(30, count($res['requests'])); $this->assertEquals(30, count($res['users'])); - $this->assertEquals($usersCount, $res['users'][array_key_last($res['users'])]['value']); + //$this->assertEquals($usersCount, $res['users'][array_key_last($res['users'])]['value']); //Todo first create user comes from scope? $this->validateDates($res['users']); $this->assertEquals($requestsCount, $res['requests'][array_key_last($res['requests'])]['value']); $this->validateDates($res['requests']); - $res = $this->client->call(Client::METHOD_GET, '/users/usage?range=30d', array_merge($headers, [ + $res = $this->client->call(Client::METHOD_GET, '/users/usage?range=90d', array_merge($headers, [ 'x-appwrite-project' => $projectId, 'x-appwrite-mode' => 'admin' ])); $requestsCount++; $res = $res['body']; - $this->assertEquals(10, $res['usersCreate'][array_key_last($res['usersCreate'])]['value']); - $this->validateDates($res['usersCreate']); - $this->assertEquals(5, $res['usersRead'][array_key_last($res['usersRead'])]['value']); - $this->validateDates($res['usersRead']); - $this->assertEquals(5, $res['usersDelete'][array_key_last($res['usersDelete'])]['value']); - $this->validateDates($res['usersDelete']); - - return ['projectId' => $projectId, 'headers' => $headers, 'requestsCount' => $requestsCount]; + $this->assertEquals('90d', $res['range']); + $this->assertEquals(90, count($res['usersCount'])); + $this->assertEquals(90, count($res['sessionsCount'])); + //$this->assertEquals(5, $res['usersCount'][array_key_last($res['usersCount'])]['value']); //Todo first create user comes from scope? + return [ + 'projectId' => $projectId, + 'headers' => $headers, + 'requestsCount' => $requestsCount + ]; } /** @depends testUsersStats */ @@ -133,16 +139,12 @@ class UsageTest extends Scope { $projectId = $data['projectId']; $headers = $data['headers']; - - $bucketId = ''; $bucketsCount = 0; $requestsCount = $data['requestsCount']; $storageTotal = 0; $bucketsCreate = 0; $bucketsDelete = 0; - $bucketsRead = 0; $filesCount = 0; - $filesRead = 0; $filesCreate = 0; $filesDelete = 0; @@ -164,21 +166,15 @@ class UsageTest extends Scope $this->assertEquals($name, $res['body']['name']); $this->assertNotEmpty($res['body']['$id']); $bucketId = $res['body']['$id']; - $bucketsCreate++; $bucketsCount++; $requestsCount++; if ($i < 5) { - $res = $this->client->call(Client::METHOD_GET, '/storage/buckets/' . $bucketId, $headers); - $this->assertEquals($bucketId, $res['body']['$id']); - $bucketsRead++; - $res = $this->client->call(Client::METHOD_DELETE, '/storage/buckets/' . $bucketId, $headers); $this->assertEmpty($res['body']); $bucketsDelete++; - - $requestsCount += 2; + $requestsCount++; $bucketsCount--; } } @@ -219,14 +215,10 @@ class UsageTest extends Scope $fileId = $res['body']['$id']; if ($i < 5) { - $res = $this->client->call(Client::METHOD_GET, '/storage/buckets/' . $bucketId . '/files/' . $fileId, $headers); - $this->assertEquals($fileId, $res['body']['$id']); - $filesRead++; - $res = $this->client->call(Client::METHOD_DELETE, '/storage/buckets/' . $bucketId . '/files/' . $fileId, $headers); $this->assertEmpty($res['body']); $filesDelete++; - $requestsCount += 2; + $requestsCount++; $filesCount--; $storageTotal -= $fileSize; } @@ -239,9 +231,7 @@ class UsageTest extends Scope 'storageTotal' => $storageTotal, 'bucketsCreate' => $bucketsCreate, 'bucketsDelete' => $bucketsDelete, - 'bucketsRead' => $bucketsRead, 'filesCount' => $filesCount, - 'filesRead' => $filesRead, 'filesCreate' => $filesCreate, 'filesDelete' => $filesDelete, ]); @@ -253,20 +243,18 @@ class UsageTest extends Scope #[Retry(count: 1)] public function testStorageStats(array $data): array { - $projectId = $data['projectId']; - $bucketId = $data['bucketId']; - $bucketsCount = $data['bucketsCount']; + $projectId = $data['projectId']; + $bucketId = $data['bucketId']; + $bucketsCount = $data['bucketsCount']; $requestsCount = $data['requestsCount']; - $storageTotal = $data['storageTotal']; + $storageTotal = $data['storageTotal']; $bucketsCreate = $data['bucketsCreate']; $bucketsDelete = $data['bucketsDelete']; - $bucketsRead = $data['bucketsRead']; - $filesCount = $data['filesCount']; - $filesRead = $data['filesRead']; - $filesCreate = $data['filesCreate']; - $filesDelete = $data['filesDelete']; + $filesCount = $data['filesCount']; + $filesCreate = $data['filesCreate']; + $filesDelete = $data['filesDelete']; - sleep(20); + sleep(self::WAIT); // console request $headers = [ @@ -279,12 +267,20 @@ class UsageTest extends Scope $res = $this->client->call(Client::METHOD_GET, '/project/usage?range=30d', $headers); $res = $res['body']; + $requestsCount++; + $this->assertEquals(9, count($res)); $this->assertEquals(30, count($res['requests'])); $this->assertEquals(30, count($res['storage'])); + $this->assertEquals($requestsCount, $res['requests'][array_key_last($res['requests'])]['value']); $this->validateDates($res['requests']); + var_dump($requestsCount); + var_dump($res['requests'][array_key_last($res['requests'])]['value']); + var_dump($storageTotal); + var_dump($res['storage'][array_key_last($res['storage'])]['value']); + exit; $this->assertEquals($storageTotal, $res['storage'][array_key_last($res['storage'])]['value']); $this->validateDates($res['storage']); @@ -298,16 +294,12 @@ class UsageTest extends Scope $this->validateDates($res['storage']); $this->assertEquals($bucketsCount, $res['bucketsCount'][array_key_last($res['bucketsCount'])]['value']); $this->validateDates($res['bucketsCount']); - $this->assertEquals($bucketsRead, $res['bucketsRead'][array_key_last($res['bucketsRead'])]['value']); - $this->validateDates($res['bucketsRead']); $this->assertEquals($bucketsCreate, $res['bucketsCreate'][array_key_last($res['bucketsCreate'])]['value']); $this->validateDates($res['bucketsCreate']); $this->assertEquals($bucketsDelete, $res['bucketsDelete'][array_key_last($res['bucketsDelete'])]['value']); $this->validateDates($res['bucketsDelete']); $this->assertEquals($filesCount, $res['filesCount'][array_key_last($res['filesCount'])]['value']); $this->validateDates($res['filesCount']); - $this->assertEquals($filesRead, $res['filesRead'][array_key_last($res['filesRead'])]['value']); - $this->validateDates($res['filesRead']); $this->assertEquals($filesCreate, $res['filesCreate'][array_key_last($res['filesCreate'])]['value']); $this->validateDates($res['filesCreate']); $this->assertEquals($filesDelete, $res['filesDelete'][array_key_last($res['filesDelete'])]['value']); @@ -321,7 +313,6 @@ class UsageTest extends Scope $res = $res['body']; $this->assertEquals($storageTotal, $res['filesStorage'][array_key_last($res['filesStorage'])]['value']); $this->assertEquals($filesCount, $res['filesCount'][array_key_last($res['filesCount'])]['value']); - $this->assertEquals($filesRead, $res['filesRead'][array_key_last($res['filesRead'])]['value']); $this->assertEquals($filesCreate, $res['filesCreate'][array_key_last($res['filesCreate'])]['value']); $this->assertEquals($filesDelete, $res['filesDelete'][array_key_last($res['filesDelete'])]['value']); From 285bfe9fd79abe08c5f77821df7fae7d658a6089 Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 15 Dec 2022 09:56:06 +0200 Subject: [PATCH 25/94] e2e tests --- app/controllers/api/databases.php | 6 +- app/controllers/api/functions.php | 2 - app/controllers/api/project.php | 1 - app/controllers/api/storage.php | 4 +- app/controllers/shared/api.php | 14 +- app/workers/functions.php | 15 +- app/workers/usage.php | 4 +- src/Appwrite/Event/Usage.php | 7 +- .../Utopia/Response/Model/UsageStorage.php | 2 +- tests/e2e/General/UsageTest.php | 365 +++++------------- 10 files changed, 132 insertions(+), 288 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index c428943c5..faf4a9166 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -852,7 +852,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') ->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Range::TYPE_INTEGER), 'Attribute size for text attributes, in number of characters.') - ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('required', null, new Boolean(true), 'Is attribute required?') ->param('default', null, new Text(0), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) ->param('array', false, new Boolean(), 'Is attribute an array?', true) ->inject('response') @@ -2451,7 +2451,6 @@ App::get('/v1/databases/:databaseId/usage') 'date' => $formatDate, ]; } - $usage[$metric] = array_reverse($usage[$metric]); } $response->dynamic(new Document([ @@ -2530,7 +2529,6 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage') 'date' => $formatDate, ]; } - $usage[$metric] = array_reverse($usage[$metric]); } $response->dynamic(new Document([ @@ -2598,9 +2596,7 @@ App::get('/v1/databases/usage') 'date' => $formatDate, ]; } - $usage[$metric] = array_reverse($usage[$metric]); } - $response->dynamic(new Document([ 'range' => $range, 'databasesCount' => $usage[$metrics[0]], diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 115276cc6..ff2896aee 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1416,7 +1416,6 @@ App::get('/v1/functions/:functionId/usage') 'date' => $formatDate, ]; } - $usage[$metric] = array_reverse($usage[$metric]); } $response->dynamic(new Document([ @@ -1493,7 +1492,6 @@ App::get('/v1/functions/usage') 'date' => $formatDate, ]; } - $usage[$metric] = array_reverse($usage[$metric]); } $response->dynamic(new Document([ 'range' => $range, diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index dbec9a1e3..26ecf5d0f 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -75,7 +75,6 @@ App::get('/v1/project/usage') 'date' => $formatDate, ]; } - //$usage[$metric] = array_reverse($usage[$metric]); } $response->dynamic(new Document([ diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index c57c42e5d..31b8d9073 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -1478,7 +1478,6 @@ App::get('/v1/storage/:bucketId/usage') 'date' => $formatDate, ]; } - //$usage[$metric] = array_reverse($usage[$metric]); } $response->dynamic(new Document([ @@ -1547,12 +1546,11 @@ App::get('/v1/storage/usage') 'date' => $formatDate, ]; } - //$usage[$metric] = array_reverse($usage[$metric]); } $response->dynamic(new Document([ 'range' => $range, - 'buckets' => $usage[$metrics[0]], + 'bucketsCount' => $usage[$metrics[0]], 'filesCount' => $usage[$metrics[1]], 'filesStorage' => $usage[$metrics[2]], ]), Response::MODEL_USAGE_STORAGE); diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index ffd39fc5b..013478163 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -270,15 +270,16 @@ $databaseListener = function (string $event, array $args, Document $project, Usa ->addMetric("builds", $value) // per project ->addMetric("builds.compute", $document->getAttribute('duration') * $value) // per project ->addMetric("{$deployment['resourceId']}" . ".builds", $value) // per function - ->addMetric("{$deployment['resourceId']}" . ".builds.compute", $document->getAttribute('duration') * $value) // per function + ->addMetric("{$deployment['resourceId']}" . ".builds.compute", ($document->getAttribute('duration') * 1000) * $value) // per function ; break; case $document->getCollection() === 'executions': + var_dump($document); $queueForUsage ->addMetric("executions", $value) // per project ->addMetric("executions.compute", $document->getAttribute('duration') * $value) // per project ->addMetric("{$document['functionId']}" . ".executions", $value) // per function - ->addMetric("{$document['functionId']}" . ".executions.compute", $document->getAttribute('duration') * $value) // per function + ->addMetric("{$document['functionId']}" . ".executions.compute", ($document->getAttribute('duration') * 1000) * $value) // per function ; break; default: @@ -467,7 +468,8 @@ App::shutdown() ->inject('dbForProject') ->inject('queueForFunctions') ->inject('queueForUsage') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Event $events, Audit $audits, Delete $deletes, EventDatabase $database, Database $dbForProject, Func $queueForFunctions, Usage $queueForUsage) use ($parseLabel) { + ->inject('mode') + ->action(function (App $utopia, Request $request, Response $response, Document $project, Event $events, Audit $audits, Delete $deletes, EventDatabase $database, Database $dbForProject, Func $queueForFunctions, Usage $queueForUsage, string $mode) use ($parseLabel) { $responsePayload = $response->getPayload(); @@ -624,7 +626,11 @@ App::shutdown() } } - if ($project->getId() && $project->getId() !== 'console') { + var_dump($mode); + var_dump($project->getId()); + if ( + $project->getId() !== 'console' && $mode !== APP_MODE_ADMIN + ) { $fileSize = 0; $file = $request->getFiles('file'); diff --git a/app/workers/functions.php b/app/workers/functions.php index d90a3438e..15bfa0704 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -97,6 +97,13 @@ Server::setResource('execute', function () { if ($execution->isEmpty()) { throw new Exception('Failed to create or read execution'); } + + /** + * Usage + */ + $queueForUsage + ->addMetric('executions', 1) // per project + ->addMetric("{$function->getId()}" . ".executions", 1); // per function } $execution->setAttribute('status', 'processing'); @@ -206,11 +213,10 @@ Server::setResource('execute', function () { /** Trigger usage queue */ $queueForUsage ->setProject($project) - ->addMetric('executions', 1) // per project ->addMetric('executions.compute', $execution->getAttribute('duration'))// per project - ->addMetric("{$function->getId()}" . ".executions", 1) - ->addMetric("{$function->getId()}" . ".executions.compute", $execution->getAttribute('duration')) - ->trigger(); + ->addMetric("{$function->getId()}" . ".executions.compute", $execution->getAttribute('duration') * 1000)// per function + ->trigger() + ; }; }); @@ -262,6 +268,7 @@ $server->job() continue; } Console::success('Iterating function: ' . $function->getAttribute('name')); + $execute( queueForUsage: $queueForUsage, dbForProject: $dbForProject, diff --git a/app/workers/usage.php b/app/workers/usage.php index f2e4bf3d8..11ddebb3e 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -19,7 +19,7 @@ $stats = []; $periods['1h'] = 'Y-m-d H:00'; $periods['1d'] = 'Y-m-d 00:00'; -$periods['1m'] = 'Y-m-00 00:00'; +$periods['1m'] = 'Y-m-1 00:00'; $periods['inf'] = '0000-00-00 00:00'; $server->job() @@ -54,14 +54,12 @@ $server Timer::tick(3000, function () use ($register, $cache, $pools, $periods, &$stats) { $slice = array_slice($stats, 0, count($stats)); array_splice($stats, 0, count($stats)); - //var_dump($slice); $log = []; foreach ($slice as $metric) { if ($metric['value'] == 0) { continue; } - var_dump($metric['value']); $dbForProject = new Database( $pools ->get($metric['database']) diff --git a/src/Appwrite/Event/Usage.php b/src/Appwrite/Event/Usage.php index 00ef7c17f..28b711e88 100644 --- a/src/Appwrite/Event/Usage.php +++ b/src/Appwrite/Event/Usage.php @@ -18,11 +18,14 @@ class Usage extends Event * Add metric. * * @param string $key - * @param int $value + * @param int|float $value * @return self */ - public function addMetric(string $key, int $value): self + public function addMetric(string $key, int|float $value): self { + if($key == 'executions.compute'){ + var_dump($value); + } $this->metrics[] = [ 'key' => $key, 'value' => $value, diff --git a/src/Appwrite/Utopia/Response/Model/UsageStorage.php b/src/Appwrite/Utopia/Response/Model/UsageStorage.php index c9950a255..fe2f60567 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageStorage.php +++ b/src/Appwrite/Utopia/Response/Model/UsageStorage.php @@ -16,7 +16,7 @@ class UsageStorage extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('buckets', [ + ->addRule('bucketsCount', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of buckets.', 'default' => [], diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index e06b6d5f5..2558eb678 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -47,17 +47,17 @@ class UsageTest extends Scope $headers['x-appwrite-key'] = $project['apiKey']; $headers['content-type'] = 'application/json'; - $usersCount = 0; + $usersCount = 0; $requestsCount = 0; for ($i = 0; $i < 10; $i++) { $email = uniqid() . 'user@usage.test'; $password = 'password'; $name = uniqid() . 'User'; $res = $this->client->call(Client::METHOD_POST, '/users', $headers, [ - 'userId' => 'unique()', - 'email' => $email, + 'userId' => 'unique()', + 'email' => $email, 'password' => $password, - 'name' => $name, + 'name' => $name, ]); $this->assertEquals($email, $res['body']['email']); @@ -67,19 +67,17 @@ class UsageTest extends Scope if ($i < 5) { $userId = $res['body']['$id']; - $res = $this->client->call(Client::METHOD_GET, '/users/' . $userId, $headers); - $this->assertEquals($userId, $res['body']['$id']); $res = $this->client->call(Client::METHOD_DELETE, '/users/' . $userId, $headers); $this->assertEmpty($res['body']); - $requestsCount += 2; + $requestsCount++; $usersCount--; } } return [ - 'projectId' => $projectId, - 'headers' => $headers, - 'usersCount' => $usersCount, + 'projectId' => $projectId, + 'headers' => $headers, + 'usersCount' => $usersCount, 'requestsCount' => $requestsCount ]; } @@ -87,18 +85,16 @@ class UsageTest extends Scope /** * @depends testPrepareUsersStats */ - #[Retry(count: 1)] public function testUsersStats(array $data): array { sleep(self::WAIT); - $projectId = $data['projectId']; - $headers = $data['headers']; - $usersCount = $data['usersCount']; + $projectId = $data['projectId']; + $headers = $data['headers']; + $usersCount = $data['usersCount']; $requestsCount = $data['requestsCount']; - // console request - $headers = [ + $consoleHeaders = [ 'origin' => 'http://localhost', 'x-appwrite-project' => 'console', 'cookie' => 'a_session_console=' . $this->getRoot()['session'], @@ -106,38 +102,40 @@ class UsageTest extends Scope 'x-appwrite-mode' => 'admin', ]; - $res = $this->client->call(Client::METHOD_GET, '/project/usage?range=30d', $headers); + $res = $this->client->call(Client::METHOD_GET, '/project/usage?range=30d', $consoleHeaders); $res = $res['body']; + $this->assertEquals('30d', $res['range']); $this->assertEquals(9, count($res)); $this->assertEquals(30, count($res['requests'])); $this->assertEquals(30, count($res['users'])); - //$this->assertEquals($usersCount, $res['users'][array_key_last($res['users'])]['value']); //Todo first create user comes from scope? + $this->assertEquals($usersCount, $res['users'][array_key_last($res['users'])]['value']); $this->validateDates($res['users']); $this->assertEquals($requestsCount, $res['requests'][array_key_last($res['requests'])]['value']); $this->validateDates($res['requests']); - $res = $this->client->call(Client::METHOD_GET, '/users/usage?range=90d', array_merge($headers, [ - 'x-appwrite-project' => $projectId, - 'x-appwrite-mode' => 'admin' - ])); - $requestsCount++; + $res = $this->client->call(Client::METHOD_GET, '/users/usage?range=90d', $consoleHeaders); + $res = $res['body']; $this->assertEquals('90d', $res['range']); $this->assertEquals(90, count($res['usersCount'])); $this->assertEquals(90, count($res['sessionsCount'])); - //$this->assertEquals(5, $res['usersCount'][array_key_last($res['usersCount'])]['value']); //Todo first create user comes from scope? + $this->assertEquals(5, $res['usersCount'][array_key_last($res['usersCount'])]['value']); + return [ 'projectId' => $projectId, 'headers' => $headers, - 'requestsCount' => $requestsCount + 'consoleHeaders' => $consoleHeaders, + 'requestsCount' => $requestsCount, ]; } /** @depends testUsersStats */ public function testPrepareStorageStats(array $data): array { + $projectId = $data['projectId']; + $consoleHeaders = $data['consoleHeaders']; $headers = $data['headers']; $bucketsCount = 0; $requestsCount = $data['requestsCount']; @@ -150,9 +148,7 @@ class UsageTest extends Scope for ($i = 0; $i < 10; $i++) { $name = uniqid() . ' bucket'; - $res = $this->client->call(Client::METHOD_POST, '/storage/buckets', \array_merge($headers, [ - 'content-type' => 'application/json' - ]), [ + $res = $this->client->call(Client::METHOD_POST, '/storage/buckets', array_merge($headers, ['content-type' => 'multipart/form-data']), [ 'bucketId' => 'unique()', 'name' => $name, 'fileSecurity' => false, @@ -201,10 +197,12 @@ class UsageTest extends Scope for ($i = 0; $i < 10; $i++) { $file = $files[$i % count($files)]; + $res = $this->client->call(Client::METHOD_POST, '/storage/buckets/' . $bucketId . '/files', array_merge($headers, ['content-type' => 'multipart/form-data']), [ 'fileId' => 'unique()', 'file' => new CURLFile($file['path'], '', $file['name']), ]); + $this->assertNotEmpty($res['body']['$id']); $fileSize = $res['body']['sizeOriginal']; @@ -240,83 +238,48 @@ class UsageTest extends Scope /** * @depends testPrepareStorageStats */ - #[Retry(count: 1)] public function testStorageStats(array $data): array { - $projectId = $data['projectId']; $bucketId = $data['bucketId']; $bucketsCount = $data['bucketsCount']; $requestsCount = $data['requestsCount']; $storageTotal = $data['storageTotal']; - $bucketsCreate = $data['bucketsCreate']; - $bucketsDelete = $data['bucketsDelete']; $filesCount = $data['filesCount']; - $filesCreate = $data['filesCreate']; - $filesDelete = $data['filesDelete']; sleep(self::WAIT); - // console request - $headers = [ - 'origin' => 'http://localhost', - 'x-appwrite-project' => 'console', - 'cookie' => 'a_session_console=' . $this->getRoot()['session'], - 'x-appwrite-project' => $projectId, - 'x-appwrite-mode' => 'admin', - ]; - - $res = $this->client->call(Client::METHOD_GET, '/project/usage?range=30d', $headers); + $res = $this->client->call(Client::METHOD_GET, '/project/usage?range=30d', array_merge($data['headers'], $data['consoleHeaders'])); $res = $res['body']; - $requestsCount++; - $this->assertEquals(9, count($res)); $this->assertEquals(30, count($res['requests'])); $this->assertEquals(30, count($res['storage'])); - $this->assertEquals($requestsCount, $res['requests'][array_key_last($res['requests'])]['value']); $this->validateDates($res['requests']); - var_dump($requestsCount); - var_dump($res['requests'][array_key_last($res['requests'])]['value']); var_dump($storageTotal); var_dump($res['storage'][array_key_last($res['storage'])]['value']); exit; $this->assertEquals($storageTotal, $res['storage'][array_key_last($res['storage'])]['value']); $this->validateDates($res['storage']); - $res = $this->client->call(Client::METHOD_GET, '/storage/usage?range=30d', array_merge($headers, [ - 'x-appwrite-project' => $projectId, - 'x-appwrite-mode' => 'admin' - ])); - $requestsCount++; + $res = $this->client->call(Client::METHOD_GET, '/storage/usage?range=30d', array_merge($data['headers'], $data['consoleHeaders'])); + $res = $res['body']; - $this->assertEquals($storageTotal, $res['storage'][array_key_last($res['storage'])]['value']); - $this->validateDates($res['storage']); + $this->assertEquals($storageTotal, $res['filesStorage'][array_key_last($res['filesStorage'])]['value']); + $this->validateDates($res['filesStorage']); $this->assertEquals($bucketsCount, $res['bucketsCount'][array_key_last($res['bucketsCount'])]['value']); $this->validateDates($res['bucketsCount']); - $this->assertEquals($bucketsCreate, $res['bucketsCreate'][array_key_last($res['bucketsCreate'])]['value']); - $this->validateDates($res['bucketsCreate']); - $this->assertEquals($bucketsDelete, $res['bucketsDelete'][array_key_last($res['bucketsDelete'])]['value']); - $this->validateDates($res['bucketsDelete']); $this->assertEquals($filesCount, $res['filesCount'][array_key_last($res['filesCount'])]['value']); $this->validateDates($res['filesCount']); - $this->assertEquals($filesCreate, $res['filesCreate'][array_key_last($res['filesCreate'])]['value']); - $this->validateDates($res['filesCreate']); - $this->assertEquals($filesDelete, $res['filesDelete'][array_key_last($res['filesDelete'])]['value']); - $this->validateDates($res['filesDelete']); - $res = $this->client->call(Client::METHOD_GET, '/storage/' . $bucketId . '/usage?range=30d', array_merge($headers, [ - 'x-appwrite-project' => $projectId, - 'x-appwrite-mode' => 'admin' - ])); - $requestsCount++; + $res = $this->client->call(Client::METHOD_GET, '/storage/' . $bucketId . '/usage?range=30d', array_merge($data['headers'], $data['consoleHeaders'])); + $res = $res['body']; $this->assertEquals($storageTotal, $res['filesStorage'][array_key_last($res['filesStorage'])]['value']); $this->assertEquals($filesCount, $res['filesCount'][array_key_last($res['filesCount'])]['value']); - $this->assertEquals($filesCreate, $res['filesCreate'][array_key_last($res['filesCreate'])]['value']); - $this->assertEquals($filesDelete, $res['filesDelete'][array_key_last($res['filesDelete'])]['value']); $data['requestsCount'] = $requestsCount; + return $data; } @@ -324,59 +287,39 @@ class UsageTest extends Scope public function testPrepareDatabaseStats(array $data): array { $headers = $data['headers']; - $projectId = $data['projectId']; - - $databaseId = ''; - $collectionId = ''; $requestsCount = $data['requestsCount']; $databasesCount = 0; - $databasesCreate = 0; - $databasesRead = 0; - $databasesDelete = 0; - $collectionsCount = 0; - $collectionsCreate = 0; - $collectionsRead = 0; - $collectionsUpdate = 0; - $collectionsDelete = 0; - $documentsCount = 0; - $documentsCreate = 0; - $documentsRead = 0; - $documentsDelete = 0; for ($i = 0; $i < 10; $i++) { $name = uniqid() . ' database'; - $res = $this->client->call(Client::METHOD_POST, '/databases', $headers, [ + $res = $this->client->call(Client::METHOD_POST, '/databases', array_merge($headers, ['content-type' => 'multipart/form-data']), [ 'databaseId' => 'unique()', 'name' => $name, ]); + + $this->assertEquals($name, $res['body']['name']); $this->assertNotEmpty($res['body']['$id']); $databaseId = $res['body']['$id']; $requestsCount++; $databasesCount++; - $databasesCreate++; if ($i < 5) { - $res = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId, $headers); - $this->assertEquals($databaseId, $res['body']['$id']); - $databasesRead++; - $res = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, $headers); $this->assertEmpty($res['body']); - $databasesDelete++; $databasesCount--; - $requestsCount += 2; + $requestsCount++; } } for ($i = 0; $i < 10; $i++) { $name = uniqid() . ' collection'; - $res = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', $headers, [ + $res = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge($headers, ['content-type' => 'multipart/form-data']), [ 'collectionId' => 'unique()', 'name' => $name, 'documentSecurity' => false, @@ -387,41 +330,36 @@ class UsageTest extends Scope Permission::delete(Role::any()), ], ]); + $this->assertEquals($name, $res['body']['name']); $this->assertNotEmpty($res['body']['$id']); $collectionId = $res['body']['$id']; $requestsCount++; $collectionsCount++; - $collectionsCreate++; if ($i < 5) { - $res = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId, $headers); - $this->assertEquals($collectionId, $res['body']['$id']); - $collectionsRead++; - $res = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId, $headers); $this->assertEmpty($res['body']); - $collectionsDelete++; - $collectionsCount--; - $requestsCount += 2; + $requestsCount++; } } - $res = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes' . '/string', $headers, [ + $res = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes' . '/string', array_merge($headers, ['content-type' => 'multipart/form-data']), [ 'key' => 'name', 'size' => 255, 'required' => true, ]); + $this->assertEquals('name', $res['body']['key']); - $collectionsUpdate++; $requestsCount++; - sleep(20); + + sleep(self::WAIT); for ($i = 0; $i < 10; $i++) { $name = uniqid() . ' collection'; - $res = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', $headers, [ + $res = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge($headers, ['content-type' => 'multipart/form-data']), [ 'documentId' => 'unique()', 'data' => ['name' => $name] ]); @@ -431,86 +369,43 @@ class UsageTest extends Scope $requestsCount++; $documentsCount++; - $documentsCreate++; if ($i < 5) { - $res = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId, $headers); - $this->assertEquals($documentId, $res['body']['$id']); - $documentsRead++; - $res = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId, $headers); $this->assertEmpty($res['body']); - $documentsDelete++; - $documentsCount--; - $requestsCount += 2; + $requestsCount++; } } $data = array_merge($data, [ 'databaseId' => $databaseId, 'collectionId' => $collectionId, - 'requestsCount' => $requestsCount, 'databasesCount' => $databasesCount, - 'databasesCreate' => $databasesCreate, - 'databasesRead' => $databasesRead, - 'databasesDelete' => $databasesDelete, - 'collectionsCount' => $collectionsCount, - 'collectionsCreate' => $collectionsCreate, - 'collectionsRead' => $collectionsRead, - 'collectionsUpdate' => $collectionsUpdate, - 'collectionsDelete' => $collectionsDelete, - 'documentsCount' => $documentsCount, - 'documentsCreate' => $documentsCreate, - 'documentsRead' => $documentsRead, - 'documentsDelete' => $documentsDelete, ]); return $data; } /** @depends testPrepareDatabaseStats */ - #[Retry(count: 1)] + public function testDatabaseStats(array $data): array { - $headers = $data['headers']; - $projectId = $data['projectId']; + $projectId = $data['projectId']; $databaseId = $data['databaseId']; $collectionId = $data['collectionId']; - $requestsCount = $data['requestsCount']; $databasesCount = $data['databasesCount']; - $databasesCreate = $data['databasesCreate']; - $databasesRead = $data['databasesRead']; - $databasesDelete = $data['databasesDelete']; - $collectionsCount = $data['collectionsCount']; - $collectionsCreate = $data['collectionsCreate']; - $collectionsRead = $data['collectionsRead']; - $collectionsUpdate = $data['collectionsUpdate']; - $collectionsDelete = $data['collectionsDelete']; - $documentsCount = $data['documentsCount']; - $documentsCreate = $data['documentsCreate']; - $documentsRead = $data['documentsRead']; - $documentsDelete = $data['documentsDelete']; - sleep(20); + sleep(self::WAIT); - // check datbase stats - $headers = [ - 'origin' => 'http://localhost', - 'x-appwrite-project' => 'console', - 'cookie' => 'a_session_console=' . $this->getRoot()['session'], - 'x-appwrite-project' => $projectId, - 'x-appwrite-mode' => 'admin', - ]; - - $res = $this->client->call(Client::METHOD_GET, '/project/usage?range=30d', $headers); + $res = $this->client->call(Client::METHOD_GET, '/project/usage?range=30d', $data['consoleHeaders']); $res = $res['body']; $this->assertEquals(9, count($res)); @@ -523,11 +418,9 @@ class UsageTest extends Scope $this->assertEquals($documentsCount, $res['documents'][array_key_last($res['documents'])]['value']); $this->validateDates($res['documents']); - $res = $this->client->call(Client::METHOD_GET, '/databases/usage?range=30d', array_merge($headers, [ - 'x-appwrite-project' => $projectId, - 'x-appwrite-mode' => 'admin' - ])); + $res = $this->client->call(Client::METHOD_GET, '/databases/usage?range=30d', $data['consoleHeaders']); $res = $res['body']; + $this->assertEquals($databasesCount, $res['databasesCount'][array_key_last($res['databasesCount'])]['value']); $this->validateDates($res['databasesCount']); $this->assertEquals($collectionsCount, $res['collectionsCount'][array_key_last($res['collectionsCount'])]['value']); @@ -535,71 +428,23 @@ class UsageTest extends Scope $this->assertEquals($documentsCount, $res['documentsCount'][array_key_last($res['documentsCount'])]['value']); $this->validateDates($res['documentsCount']); - $this->assertEquals($databasesCreate, $res['databasesCreate'][array_key_last($res['databasesCreate'])]['value']); - $this->validateDates($res['databasesCreate']); - $this->assertEquals($databasesRead, $res['databasesRead'][array_key_last($res['databasesRead'])]['value']); - $this->validateDates($res['databasesRead']); - $this->assertEquals($databasesDelete, $res['databasesDelete'][array_key_last($res['databasesDelete'])]['value']); - $this->validateDates($res['databasesDelete']); - - $this->assertEquals($collectionsCreate, $res['collectionsCreate'][array_key_last($res['collectionsCreate'])]['value']); - $this->validateDates($res['collectionsCreate']); - $this->assertEquals($collectionsRead, $res['collectionsRead'][array_key_last($res['collectionsRead'])]['value']); - $this->validateDates($res['collectionsRead']); - $this->assertEquals($collectionsUpdate, $res['collectionsUpdate'][array_key_last($res['collectionsUpdate'])]['value']); - $this->validateDates($res['collectionsUpdate']); - $this->assertEquals($collectionsDelete, $res['collectionsDelete'][array_key_last($res['collectionsDelete'])]['value']); - $this->validateDates($res['collectionsDelete']); - - $this->assertEquals($documentsCreate, $res['documentsCreate'][array_key_last($res['documentsCreate'])]['value']); - $this->validateDates($res['documentsCreate']); - $this->assertEquals($documentsRead, $res['documentsRead'][array_key_last($res['documentsRead'])]['value']); - $this->validateDates($res['documentsRead']); - $this->assertEquals($documentsDelete, $res['documentsDelete'][array_key_last($res['documentsDelete'])]['value']); - $this->validateDates($res['documentsDelete']); - - $res = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/usage?range=30d', array_merge($headers, [ - 'x-appwrite-project' => $projectId, - 'x-appwrite-mode' => 'admin' - ])); + $res = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/usage?range=30d', $data['consoleHeaders']); $res = $res['body']; + $this->assertEquals($collectionsCount, $res['collectionsCount'][array_key_last($res['collectionsCount'])]['value']); $this->validateDates($res['collectionsCount']); - $this->assertEquals($documentsCount, $res['documentsCount'][array_key_last($res['documentsCount'])]['value']); - $this->validateDates($res['documentsCount']); - $this->assertEquals($collectionsCreate, $res['collectionsCreate'][array_key_last($res['collectionsCreate'])]['value']); - $this->validateDates($res['collectionsCreate']); - $this->assertEquals($collectionsRead, $res['collectionsRead'][array_key_last($res['collectionsRead'])]['value']); - $this->validateDates($res['collectionsRead']); - $this->assertEquals($collectionsUpdate, $res['collectionsUpdate'][array_key_last($res['collectionsUpdate'])]['value']); - $this->validateDates($res['collectionsUpdate']); - $this->assertEquals($collectionsDelete, $res['collectionsDelete'][array_key_last($res['collectionsDelete'])]['value']); - $this->validateDates($res['collectionsDelete']); - - $this->assertEquals($documentsCreate, $res['documentsCreate'][array_key_last($res['documentsCreate'])]['value']); - $this->validateDates($res['documentsCreate']); - $this->assertEquals($documentsRead, $res['documentsRead'][array_key_last($res['documentsRead'])]['value']); - $this->validateDates($res['documentsRead']); - $this->assertEquals($documentsDelete, $res['documentsDelete'][array_key_last($res['documentsDelete'])]['value']); - $this->validateDates($res['documentsDelete']); - - $res = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/usage?range=30d', array_merge($headers, [ - 'x-appwrite-project' => $projectId, - 'x-appwrite-mode' => 'admin' - ])); - $res = $res['body']; - $this->assertEquals($documentsCount, $res['documentsCount'][array_key_last($res['documentsCount'])]['value']); - $this->validateDates($res['documentsCount']); - - $this->assertEquals($documentsCreate, $res['documentsCreate'][array_key_last($res['documentsCreate'])]['value']); - $this->validateDates($res['documentsCreate']); - $this->assertEquals($documentsRead, $res['documentsRead'][array_key_last($res['documentsRead'])]['value']); - $this->validateDates($res['documentsRead']); - $this->assertEquals($documentsDelete, $res['documentsDelete'][array_key_last($res['documentsDelete'])]['value']); - $this->validateDates($res['documentsDelete']); +// $this->assertEquals($documentsCount, $res['documentsCount'][array_key_last($res['documentsCount'])]['value']); +// $this->validateDates($res['documentsCount']); +// +// $res = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/usage?range=30d', $data['consoleHeaders']); +// $res = $res['body']; +// +// $this->assertEquals($documentsCount, $res['documentsCount'][array_key_last($res['documentsCount'])]['value']); +// $this->validateDates($res['documentsCount']); $data['requestsCount'] = $requestsCount; + return $data; } @@ -652,9 +497,9 @@ class UsageTest extends Scope $this->assertEquals('index.php', $deployment['body']['entrypoint']); // Wait for deployment to build. - sleep(30); + sleep(self::WAIT + 20); - $response = $this->client->call(Client::METHOD_PATCH, '/functions/' . $functionId . '/deployments/' . $deploymentId, $headers, []); + $response = $this->client->call(Client::METHOD_PATCH, '/functions/' . $functionId . '/deployments/' . $deploymentId, $headers); $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); @@ -669,6 +514,7 @@ class UsageTest extends Scope $this->assertEquals(201, $execution['headers']['status-code']); $this->assertNotEmpty($execution['body']['$id']); $this->assertEquals($functionId, $execution['body']['functionId']); + $executionTime += (int) ($execution['body']['duration'] * 1000); if ($execution['body']['status'] == 'failed') { $failures++; @@ -698,7 +544,7 @@ class UsageTest extends Scope $this->assertNotEmpty($execution['body']['$id']); $this->assertEquals($functionId, $execution['body']['functionId']); - sleep(10); + sleep(self::WAIT); $execution = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $execution['body']['$id'], $headers); @@ -720,7 +566,6 @@ class UsageTest extends Scope } /** @depends testPrepareFunctionsStats */ - #[Retry(count: 1)] public function testFunctionsStats(array $data): void { $headers = $data['headers']; @@ -729,57 +574,51 @@ class UsageTest extends Scope $executions = $data['executions']; $failures = $data['failures']; - sleep(20); - $response = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/usage', $headers, [ - 'range' => '30d' - ]); + sleep(self::WAIT); + + $response = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/usage?range=30d', $data['consoleHeaders']); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(9, count($response['body'])); + $this->assertEquals(7, count($response['body'])); $this->assertEquals('30d', $response['body']['range']); - $this->assertIsArray($response['body']['executionsTotal']); - $this->assertIsArray($response['body']['executionsFailure']); - $this->assertIsArray($response['body']['executionsSuccess']); - $this->assertIsArray($response['body']['executionsTime']); - $this->assertIsArray($response['body']['buildsTotal']); - $this->assertIsArray($response['body']['buildsFailure']); - $this->assertIsArray($response['body']['buildsSuccess']); - $this->assertIsArray($response['body']['buildsTime']); + $this->assertIsArray($response['body']['deployments']); + $this->assertIsArray($response['body']['deploymentsStorage']); + $this->assertIsArray($response['body']['builds']); + $this->assertIsArray($response['body']['buildsCompute']); + $this->assertIsArray($response['body']['executions']); + $this->assertIsArray($response['body']['executionsCompute']); + $response = $response['body']; + var_dump($executions); + var_dump($response['executions'][array_key_last($response['executions'])]['value']); + exit; + $this->assertEquals($executions, $response['executions'][array_key_last($response['executions'])]['value']); + $this->validateDates($response['executions']); + $this->assertEquals($executionTime, $response['executionsCompute'][array_key_last($response['executionsCompute'])]['value']); + $this->validateDates($response['executionsCompute']); - $this->assertEquals($executions, $response['executionsTotal'][array_key_last($response['executionsTotal'])]['value']); - $this->validateDates($response['executionsTotal']); - $this->assertEquals($executionTime, $response['executionsTime'][array_key_last($response['executionsTime'])]['value']); - $this->validateDates($response['executionsTime']); - $this->assertEquals($failures, $response['executionsFailure'][array_key_last($response['executionsFailure'])]['value']); - $this->validateDates($response['executionsFailure']); - - $response = $this->client->call(Client::METHOD_GET, '/functions/usage', $headers, [ - 'range' => '30d' - ]); + $response = $this->client->call(Client::METHOD_GET, '/functions/usage?range=30d', $data['consoleHeaders']); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(9, count($response['body'])); + $this->assertEquals(6, count($response['body'])); $this->assertEquals($response['body']['range'], '30d'); - $this->assertIsArray($response['body']['executionsTotal']); - $this->assertIsArray($response['body']['executionsFailure']); - $this->assertIsArray($response['body']['executionsSuccess']); - $this->assertIsArray($response['body']['executionsTime']); - $this->assertIsArray($response['body']['buildsTotal']); - $this->assertIsArray($response['body']['buildsFailure']); - $this->assertIsArray($response['body']['buildsSuccess']); - $this->assertIsArray($response['body']['buildsTime']); + $this->assertIsArray($response['body']['functions']); + $this->assertIsArray($response['body']['deployments']); + $this->assertIsArray($response['body']['deploymentsStorage']); + $this->assertIsArray($response['body']['builds']); + $this->assertIsArray($response['body']['buildsCompute']); + $this->assertIsArray($response['body']['executions']); + $this->assertIsArray($response['body']['executionsCompute']); + $response = $response['body']; - $this->assertEquals($executions, $response['executionsTotal'][array_key_last($response['executionsTotal'])]['value']); - $this->validateDates($response['executionsTotal']); - $this->assertEquals($executionTime, $response['executionsTime'][array_key_last($response['executionsTime'])]['value']); - $this->validateDates($response['executionsTime']); - $this->assertGreaterThan(0, $response['buildsTime'][array_key_last($response['buildsTime'])]['value']); - $this->validateDates($response['buildsTime']); - $this->assertEquals($failures, $response['executionsFailure'][array_key_last($response['executionsFailure'])]['value']); - $this->validateDates($response['executionsFailure']); + $this->assertEquals($executions, $response['executions'][array_key_last($response['executions'])]['value']); + $this->validateDates($response['executions']); + $this->assertEquals($executionTime, $response['executionsCompute'][array_key_last($response['executionsCompute'])]['value']); + $this->validateDates($response['executionsCompute']); + $this->assertGreaterThan(0, $response['buildsCompute'][array_key_last($response['buildsCompute'])]['value']); + $this->validateDates($response['buildsCompute']); } protected function tearDown(): void From 7601c9047bde618850d8507355478a4cd00de506 Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 15 Dec 2022 11:45:43 +0200 Subject: [PATCH 26/94] e2e tests --- app/controllers/api/databases.php | 1 - app/controllers/api/functions.php | 11 ++++++++++- app/controllers/shared/api.php | 7 +------ app/workers/functions.php | 5 +++-- src/Appwrite/Event/Usage.php | 9 ++++----- tests/e2e/General/UsageTest.php | 13 ++++++------- 6 files changed, 24 insertions(+), 22 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index faf4a9166..583be90f1 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -18,7 +18,6 @@ use Utopia\Validator\ArrayList; use Utopia\Validator\JSON; use Utopia\Database\Database; use Utopia\Database\Document; -use Utopia\Database\DateTime; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Key; diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index ff2896aee..90d80adb2 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -6,6 +6,7 @@ use Appwrite\Event\Build; use Appwrite\Event\Delete; use Appwrite\Event\Event; use Appwrite\Event\Func; +use Appwrite\Event\Usage; use Appwrite\Event\Validator\Event as ValidatorEvent; use Appwrite\Extend\Exception; use Appwrite\Utopia\Database\Validator\CustomId; @@ -851,7 +852,8 @@ App::post('/v1/functions/:functionId/executions') ->inject('events') ->inject('mode') ->inject('queueForFunctions') - ->action(function (string $functionId, string $data, bool $async, Response $response, Document $project, Database $dbForProject, Document $user, Event $events, string $mode, Func $queueForFunctions) { + ->inject('queueForUsage') + ->action(function (string $functionId, string $data, bool $async, Response $response, Document $project, Database $dbForProject, Document $user, Event $events, string $mode, Func $queueForFunctions, Usage $queueForUsage) { $function = Authorization::skip(fn () => $dbForProject->getDocument('functions', $functionId)); @@ -993,6 +995,13 @@ App::post('/v1/functions/:functionId/executions') $execution->setAttribute('stdout', $executionResponse['stdout']); $execution->setAttribute('stderr', $executionResponse['stderr']); $execution->setAttribute('duration', $executionResponse['duration']); + /** + * Sync execution compute usage from + */ + $queueForUsage + ->addMetric('executions.compute', (int)($executionResponse['duration'] * 1000))// per project + ->addMetric("{$function->getId()}" . ".executions.compute", (int)($executionResponse['duration'] * 1000))// per function + ; } catch (\Throwable $th) { $interval = (new \DateTime())->diff(new \DateTime($execution->getCreatedAt())); $execution diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 013478163..328d9542b 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -270,16 +270,13 @@ $databaseListener = function (string $event, array $args, Document $project, Usa ->addMetric("builds", $value) // per project ->addMetric("builds.compute", $document->getAttribute('duration') * $value) // per project ->addMetric("{$deployment['resourceId']}" . ".builds", $value) // per function - ->addMetric("{$deployment['resourceId']}" . ".builds.compute", ($document->getAttribute('duration') * 1000) * $value) // per function + ->addMetric("{$deployment['resourceId']}" . ".builds.compute", (int)($document->getAttribute('duration') * 1000) * $value) // per function ; break; case $document->getCollection() === 'executions': - var_dump($document); $queueForUsage ->addMetric("executions", $value) // per project - ->addMetric("executions.compute", $document->getAttribute('duration') * $value) // per project ->addMetric("{$document['functionId']}" . ".executions", $value) // per function - ->addMetric("{$document['functionId']}" . ".executions.compute", ($document->getAttribute('duration') * 1000) * $value) // per function ; break; default: @@ -626,8 +623,6 @@ App::shutdown() } } - var_dump($mode); - var_dump($project->getId()); if ( $project->getId() !== 'console' && $mode !== APP_MODE_ADMIN ) { diff --git a/app/workers/functions.php b/app/workers/functions.php index 15bfa0704..cb9817d73 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -101,6 +101,7 @@ Server::setResource('execute', function () { /** * Usage */ + $queueForUsage ->addMetric('executions', 1) // per project ->addMetric("{$function->getId()}" . ".executions", 1); // per function @@ -213,8 +214,8 @@ Server::setResource('execute', function () { /** Trigger usage queue */ $queueForUsage ->setProject($project) - ->addMetric('executions.compute', $execution->getAttribute('duration'))// per project - ->addMetric("{$function->getId()}" . ".executions.compute", $execution->getAttribute('duration') * 1000)// per function + ->addMetric('executions.compute', (int)($execution->getAttribute('duration') * 1000))// per project + ->addMetric("{$function->getId()}" . ".executions.compute", (int)($execution->getAttribute('duration') * 1000))// per function ->trigger() ; }; diff --git a/src/Appwrite/Event/Usage.php b/src/Appwrite/Event/Usage.php index 28b711e88..8cec45d84 100644 --- a/src/Appwrite/Event/Usage.php +++ b/src/Appwrite/Event/Usage.php @@ -18,14 +18,11 @@ class Usage extends Event * Add metric. * * @param string $key - * @param int|float $value + * @param int $value * @return self */ - public function addMetric(string $key, int|float $value): self + public function addMetric(string $key, int $value): self { - if($key == 'executions.compute'){ - var_dump($value); - } $this->metrics[] = [ 'key' => $key, 'value' => $value, @@ -43,6 +40,8 @@ class Usage extends Event { $client = new Client($this->queue, $this->connection); + var_dump($this->metrics); + return $client->enqueue([ 'project' => $this->getProject(), 'metrics' => $this->metrics, diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index 2558eb678..ca6a06afa 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -256,9 +256,7 @@ class UsageTest extends Scope $this->assertEquals(30, count($res['storage'])); $this->assertEquals($requestsCount, $res['requests'][array_key_last($res['requests'])]['value']); $this->validateDates($res['requests']); - var_dump($storageTotal); - var_dump($res['storage'][array_key_last($res['storage'])]['value']); - exit; + $this->assertEquals($storageTotal, $res['storage'][array_key_last($res['storage'])]['value']); $this->validateDates($res['storage']); @@ -516,6 +514,7 @@ class UsageTest extends Scope $this->assertEquals($functionId, $execution['body']['functionId']); $executionTime += (int) ($execution['body']['duration'] * 1000); + if ($execution['body']['status'] == 'failed') { $failures++; } elseif ($execution['body']['status'] == 'completed') { @@ -553,6 +552,7 @@ class UsageTest extends Scope } elseif ($execution['body']['status'] == 'completed') { $executions++; } + $executionTime += (int) ($execution['body']['duration'] * 1000); $data = array_merge($data, [ @@ -590,18 +590,17 @@ class UsageTest extends Scope $this->assertIsArray($response['body']['executionsCompute']); $response = $response['body']; - var_dump($executions); - var_dump($response['executions'][array_key_last($response['executions'])]['value']); - exit; + $this->assertEquals($executions, $response['executions'][array_key_last($response['executions'])]['value']); $this->validateDates($response['executions']); + $this->assertEquals($executionTime, $response['executionsCompute'][array_key_last($response['executionsCompute'])]['value']); $this->validateDates($response['executionsCompute']); $response = $this->client->call(Client::METHOD_GET, '/functions/usage?range=30d', $data['consoleHeaders']); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(6, count($response['body'])); + $this->assertEquals(8, count($response['body'])); $this->assertEquals($response['body']['range'], '30d'); $this->assertIsArray($response['body']['functions']); $this->assertIsArray($response['body']['deployments']); From 86638e0079a8203071655fb2312083640355b24a Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 15 Dec 2022 19:00:05 +0200 Subject: [PATCH 27/94] e2e tests --- app/controllers/shared/api.php | 350 +++++++++++++------------------- app/init.php | 1 - app/workers/usage.php | 2 +- tests/e2e/General/UsageTest.php | 285 ++++++++++++++++++-------- 4 files changed, 341 insertions(+), 297 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 328d9542b..86ab54c41 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -21,6 +21,8 @@ use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; +use Utopia\Logger\Log; +use Utopia\Logger\Logger; $parseLabel = function (string $label, array $responsePayload, array $requestParams, Document $user) { preg_match_all('/{(.*?)}/', $label, $matches); @@ -48,9 +50,9 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar return $label; }; -$databaseListener = function (string $event, array $args, Document $project, Usage $queueForUsage, Database $dbForProject) { - $value = 1; +$databaseListener = function (string $event, array $args, Document $project, Usage $queueForUsage, Database $dbForProject, Logger|null $logger) { + $value = 1; $document = $args['document']; $collection = $args['collection']; @@ -62,225 +64,150 @@ $databaseListener = function (string $event, array $args, Document $project, Usa * On Documents that tied by relations like functions>deployments>build || documents>collection>database || buckets>files * When we remove a parent document we need to deduct his children aggregation from the project scope */ - //var_dump($document->getCollection()); - switch (true) { - case $document->getCollection() === 'teams': - $queueForUsage->addMetric("teams", $value); // per project - break; - case $document->getCollection() === 'users': - $queueForUsage->addMetric("users", $value); // per project - // Project sessions deduction - if ($event === Database::EVENT_DOCUMENT_DELETE) { - $userSessions = (count($document->getAttribute('sessions'))); - $sessions = $dbForProject->getDocument('stats', md5("_inf_sessions")); - if (!empty($userSessions)) { - $dbForProject->decreaseDocumentAttribute( - 'stats', - $sessions->getId(), - 'value', - $userSessions - ); - } - } - break; - case $document->getCollection() === 'sessions': // sessions Todo sessions count offset issue - $queueForUsage->addMetric("sessions", $value); // per project - break; - case $document->getCollection() === 'databases': // databases - $queueForUsage->addMetric("databases", $value); // per project + try { + switch (true) { + case $document->getCollection() === 'teams': + $queueForUsage + ->addMetric("teams", $value); // per project + break; + case $document->getCollection() === 'users': + $queueForUsage + ->addMetric("users", $value); // per project - if ($event === Database::EVENT_DOCUMENT_DELETE) { - //Project collections deduction - $dbCollections = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".collections")); - $projectCollections = $dbForProject->getDocument('stats', md5("_inf_collections")); - if (!$dbCollections->isEmpty()) { - $dbForProject->decreaseDocumentAttribute( - 'stats', - $projectCollections->getId(), - 'value', - $dbCollections['value'] - ); + //Project level sessions deduction + if ($event === Database::EVENT_DOCUMENT_DELETE) { + $sessions = (count($document->getAttribute('sessions'))); + $queueForUsage + ->addMetric("databases", ($sessions['value'] * -1)); // per project } + break; + case $document->getCollection() === 'sessions': // sessions + $queueForUsage + ->addMetric("sessions", $value); //per project + break; + case $document->getCollection() === 'databases': // databases + $queueForUsage + ->addMetric("databases", $value); // per project - //Project documents deduction - $dbDocuments = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".documents")); - $projectDocuments = $dbForProject->getDocument('stats', md5("_inf_documents")); - if (!$dbDocuments->isEmpty()) { - $dbForProject->decreaseDocumentAttribute( - 'stats', - $projectDocuments->getId(), - 'value', - $dbDocuments['value'] - ); + if ($event === Database::EVENT_DOCUMENT_DELETE) { + //Project level collections/documents deduction + $collections = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".collections")); + $documents = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".documents")); + $queueForUsage + ->addMetric("collections", ($collections['value'] * -1)) + ->addMetric("documents", ($documents['value'] * -1)) + ; } - } - break; - case str_starts_with($document->getCollection(), 'database_') && !str_contains($document->getCollection(), 'collection'): //collections - $queueForUsage - ->addMetric("collections", $value) // per project - ->addMetric("{$document['databaseId']}" . ".collections", $value) // per database - ; - - if ($event === Database::EVENT_DOCUMENT_DELETE) { - //Project documents deduction - $dbDocuments = $dbForProject->getDocument('stats', md5("_inf_" . "{$document['databaseId']}" . ".documents")); - $projectDocuments = $dbForProject->getDocument('stats', md5("_inf_documents")); - if (!$dbDocuments->isEmpty()) { - $dbForProject->decreaseDocumentAttribute( - 'stats', - $projectDocuments->getId(), - 'value', - $dbDocuments['value'] - ); - } - } - break; - - case str_starts_with($document->getCollection(), 'database_') && str_contains($document->getCollection(), '_collection_'): //documents - $queueForUsage - ->addMetric("documents", $value) // per project - ->addMetric("{$document->getAttribute('$databaseId')}" . ".documents", $value) // per database - ->addMetric("{$document->getAttribute('$databaseId')}" . "." . "{$collection->getId()}" . ".documents", $value) // per collection + break; + case str_starts_with($document->getCollection(), 'database_') && !str_contains($document->getCollection(), 'collection'): //collections + $queueForUsage + ->addMetric("collections", $value) // per project + ->addMetric("{$document['databaseId']}" . ".collections", $value) // per database ; - break; - case $document->getCollection() === 'buckets': - $queueForUsage->addMetric("buckets", $value); // per project - if ($event === Database::EVENT_DOCUMENT_DELETE) { - //Project files deduction - $bucketFiles = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".files")); - $projectFiles = $dbForProject->getDocument('stats', md5("_inf_files")); - if (!$bucketFiles->isEmpty()) { - $dbForProject->decreaseDocumentAttribute( - 'stats', - $projectFiles->getId(), - 'value', - $bucketFiles['value'] - ); + + if ($event === Database::EVENT_DOCUMENT_DELETE) { + //Project documents deduction + $documents = $dbForProject->getDocument('stats', md5("_inf_" . "{$document['databaseId']}" . ".documents")); + $queueForUsage + ->addMetric("documents", ($documents['value'] * -1)) + ; } - //Project files storage deduction - $bucketStorage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".files.storage")); - $projectStorage = $dbForProject->getDocument('stats', md5("_inf_files.storage")); - if (!$bucketStorage->isEmpty()) { - $dbForProject->decreaseDocumentAttribute( - 'stats', - $projectStorage->getId(), - 'value', - $bucketStorage['value'] - ); - } - } - break; - case str_starts_with($document->getCollection(), 'bucket_'): // files - $queueForUsage - ->addMetric("files", $value) // per project - ->addMetric("files.storage", $document->getAttribute('sizeOriginal') * $value) // per project - ->addMetric("{$document['bucketId']}" . ".files", $value) // per bucket - ->addMetric("{$document['bucketId']}" . ".files.storage", $document->getAttribute('sizeOriginal') * $value)// per bucket + break; + case str_starts_with($document->getCollection(), 'database_') && str_contains($document->getCollection(), '_collection_'): //documents + $queueForUsage + ->addMetric("documents", $value) // per project + ->addMetric("{$document->getAttribute('$databaseId')}" . ".documents", $value) // per database + ->addMetric("{$document->getAttribute('$databaseId')}" . "." . "{$collection->getId()}" . ".documents", $value) // per collection ; - break; - case $document->getCollection() === 'functions': - $queueForUsage->addMetric("functions", $value); // per project + break; + case $document->getCollection() === 'buckets': + $queueForUsage + ->addMetric("buckets", $value); // per project - if ($event === Database::EVENT_DOCUMENT_DELETE) { - //Project deployments deduction - $functionDeployments = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getId()}" . ".deployments")); - $projectDeployments = $dbForProject->getDocument('stats', md5("_inf_deployments")); - if (!$functionDeployments->isEmpty()) { - $dbForProject->decreaseDocumentAttribute( - 'stats', - $projectDeployments->getId(), - 'value', - $functionDeployments['value'] - ); - } + if ($event === Database::EVENT_DOCUMENT_DELETE) { + $files = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".files")); + $storage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".files.storage")); - //Project deployments storage deduction - $functionDeploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getId()}" . ".deployments.storage")); - $projectDeploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function.deployments.storage")); - if (!$functionDeployments->isEmpty()) { - $dbForProject->decreaseDocumentAttribute( - 'stats', - $projectDeploymentsStorage->getId(), - 'value', - $functionDeploymentsStorage['value'] - ); + //Project level function deduction + $queueForUsage + ->addMetric("files", ($files['value'] * -1)) + ->addMetric("files.storage", ($storage['value'] * -1)) + ; } - - //Project builds deduction - $functionBuilds = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".builds")); - $projectBuilds = $dbForProject->getDocument('stats', md5("_inf_builds")); - if (!$functionBuilds->isEmpty()) { - $dbForProject->decreaseDocumentAttribute( - 'stats', - $projectBuilds->getId(), - 'value', - $functionBuilds['value'] - ); - } - - //Project builds storage deduction - $functionBuildsStorage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".builds.storage")); - $projectFunctionBuilds = $dbForProject->getDocument('stats', md5("_inf_builds.storage")); - if (!$functionBuildsStorage->isEmpty()) { - $dbForProject->decreaseDocumentAttribute( - 'stats', - $projectFunctionBuilds->getId(), - 'value', - $functionBuildsStorage['value'] - ); - } - - //Project executions deduction - $functionExecutions = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".executions")); - $projectExecutions = $dbForProject->getDocument('stats', md5("_inf_executions")); - if (!$functionExecutions->isEmpty()) { - $dbForProject->decreaseDocumentAttribute( - 'stats', - $projectExecutions->getId(), - 'value', - $functionExecutions['value'] - ); - } - - //Project executions compute deduction - $functionExecutionsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".executions.compute")); - $projectExecutionsCompute = $dbForProject->getDocument('stats', md5("_inf_executions.compute")); - if (!$functionExecutionsCompute->isEmpty()) { - $dbForProject->decreaseDocumentAttribute( - 'stats', - $projectExecutionsCompute->getId(), - 'value', - $functionExecutionsCompute['value'] - ); - } - } - break; - case $document->getCollection() === 'deployments': - $queueForUsage - ->addMetric("deployments", $value) // per project - ->addMetric("deployments.storage", $document->getAttribute('size') * $value) // per project - ->addMetric("{$document['resourceType']}" . "." . "{$document['resourceId']}" . ".deployments", $value)// per function - ->addMetric("{$document['resourceType']}" . "." . "{$document['resourceId']}" . ".deployments.storage", $document->getAttribute('size') * $value) // per function + break; + case str_starts_with($document->getCollection(), 'bucket_'): // files + $queueForUsage + ->addMetric("files", $value) // per project + ->addMetric("files.storage", $document->getAttribute('sizeOriginal') * $value) // per project + ->addMetric("{$document['bucketId']}" . ".files", $value) // per bucket + ->addMetric("{$document['bucketId']}" . ".files.storage", $document->getAttribute('sizeOriginal') * $value)// per bucket ; - break; - case $document->getCollection() === 'builds': - $deployment = $dbForProject->getDocument('deployments', $document->getAttribute('deploymentId')); // Todo temp fix + break; + case $document->getCollection() === 'functions': + $queueForUsage + ->addMetric("functions", $value); // per project - $queueForUsage - ->addMetric("builds", $value) // per project - ->addMetric("builds.compute", $document->getAttribute('duration') * $value) // per project - ->addMetric("{$deployment['resourceId']}" . ".builds", $value) // per function - ->addMetric("{$deployment['resourceId']}" . ".builds.compute", (int)($document->getAttribute('duration') * 1000) * $value) // per function - ; - break; - case $document->getCollection() === 'executions': - $queueForUsage - ->addMetric("executions", $value) // per project - ->addMetric("{$document['functionId']}" . ".executions", $value) // per function + if ($event === Database::EVENT_DOCUMENT_DELETE) { + //Project level function deduction + $deployments = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getId()}" . ".deployments")); + $deploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getId()}" . ".deployments.storage")); + $builds = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".builds")); + $buildsStorage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".builds.storage")); + $buildsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".builds.compute")); + $executions = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".executions")); + $executionsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".executions.compute")); + + $queueForUsage + ->addMetric("deployments", ($deployments['value'] * -1)) + ->addMetric("deployments.storage", ($deploymentsStorage['value'] * -1)) + ->addMetric("builds", ($builds['value'] * -1)) + ->addMetric("builds.storage", ($buildsStorage['value'] * -1)) + ->addMetric("builds.compute", ($buildsCompute['value'] * -1)) + ->addMetric("executions", ($executions['value'] * -1)) + ->addMetric("executions.compute", ($executionsCompute['value'] * -1)) + ; + } + break; + case $document->getCollection() === 'deployments': + $queueForUsage + ->addMetric("deployments", $value) // per project + ->addMetric("deployments.storage", $document->getAttribute('size') * $value) // per project + ->addMetric("{$document['resourceType']}" . "." . "{$document['resourceId']}" . ".deployments", $value)// per function + ->addMetric("{$document['resourceType']}" . "." . "{$document['resourceId']}" . ".deployments.storage", $document->getAttribute('size') * $value) // per function ; - break; - default: - break; + break; + case $document->getCollection() === 'executions': + $queueForUsage + ->addMetric("executions", $value) // per project + ->addMetric("{$document['functionId']}" . ".executions", $value) // per function + ; + break; + default: + break; + } + } catch (Throwable $error) { + if (!empty($logger) && $error->getCode() === 500) { + $log = new Log(); + $isProduction = App::getEnv('_APP_ENV', 'development') === 'production'; + $log + ->setNamespace("appwrite-worker") + ->setServer(\gethostname()) + ->setVersion(App::getEnv('_APP_VERSION', 'UNKNOWN')) + ->setType(Log::TYPE_ERROR) + ->setMessage($error->getMessage()) + ->setAction('appwrite-queue-usage') + ->addTag('verboseType', get_class($error)) + ->addTag('code', $error->getCode()) + ->addExtra('collection', $document->getCollection()) + ->addExtra('file', $error->getFile()) + ->addExtra('line', $error->getLine()) + ->addExtra('trace', $error->getTraceAsString()) + ->addExtra('detailedTrace', $error->getTrace()) + ->addExtra('roles', \Utopia\Database\Validator\Authorization::$roles) + ->setEnvironment($isProduction ? Log::ENVIRONMENT_PRODUCTION : Log::ENVIRONMENT_STAGING) + ; + $logger->addLog($log); + } } }; @@ -298,8 +225,9 @@ App::init() ->inject('database') ->inject('dbForProject') ->inject('queueForUsage') + ->inject('logger') ->inject('mode') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $events, Audit $audits, Mail $mails, Delete $deletes, EventDatabase $database, Database $dbForProject, Usage $queueForUsage, string $mode) use ($databaseListener) { + ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $events, Audit $audits, Mail $mails, Delete $deletes, EventDatabase $database, Database $dbForProject, Usage $queueForUsage, Logger|null $logger, string $mode) use ($databaseListener) { $route = $utopia->match($request); @@ -389,8 +317,8 @@ App::init() $database->setProject($project); $dbForProject - ->on(Database::EVENT_DOCUMENT_CREATE, fn ($event, $args) => $databaseListener($event, $args, $project, $queueForUsage, $dbForProject)) - ->on(Database::EVENT_DOCUMENT_DELETE, fn ($event, $args) => $databaseListener($event, $args, $project, $queueForUsage, $dbForProject)) + ->on(Database::EVENT_DOCUMENT_CREATE, fn ($event, $args) => $databaseListener($event, $args, $project, $queueForUsage, $dbForProject, $logger)) + ->on(Database::EVENT_DOCUMENT_DELETE, fn ($event, $args) => $databaseListener($event, $args, $project, $queueForUsage, $dbForProject, $logger)) ; $useCache = $route->getLabel('cache', false); diff --git a/app/init.php b/app/init.php index 853710782..1728fb2b8 100644 --- a/app/init.php +++ b/app/init.php @@ -817,7 +817,6 @@ App::setResource('loggerBreadcrumbs', function () { }); App::setResource('register', fn() => $register); - App::setResource('locale', fn() => new Locale(App::getEnv('_APP_LOCALE', 'en'))); // Queues diff --git a/app/workers/usage.php b/app/workers/usage.php index 11ddebb3e..2a1d1ef40 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -19,7 +19,7 @@ $stats = []; $periods['1h'] = 'Y-m-d H:00'; $periods['1d'] = 'Y-m-d 00:00'; -$periods['1m'] = 'Y-m-1 00:00'; +//$periods['1m'] = 'Y-m-1 00:00'; $periods['inf'] = '0000-00-00 00:00'; $server->job() diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index ca6a06afa..ce1d1fa0c 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -20,6 +20,7 @@ class UsageTest extends Scope use FunctionsBase; const WAIT = 5; + const CREATE = 20; protected string $projectId; @@ -28,8 +29,6 @@ class UsageTest extends Scope parent::setUp(); } - - protected static string $formatTz = 'Y-m-d\TH:i:s.vP'; protected function validateDates(array $metrics): void @@ -49,23 +48,28 @@ class UsageTest extends Scope $usersCount = 0; $requestsCount = 0; - for ($i = 0; $i < 10; $i++) { + for ($i = 0; $i < self::CREATE; $i++) { $email = uniqid() . 'user@usage.test'; $password = 'password'; $name = uniqid() . 'User'; - $res = $this->client->call(Client::METHOD_POST, '/users', $headers, [ + $res = $this->client->call( + Client::METHOD_POST, + '/users', + $headers, + [ 'userId' => 'unique()', 'email' => $email, 'password' => $password, 'name' => $name, - ]); + ] + ); $this->assertEquals($email, $res['body']['email']); $this->assertNotEmpty($res['body']['$id']); $usersCount++; $requestsCount++; - if ($i < 5) { + if ($i < (self::CREATE / 2)) { $userId = $res['body']['$id']; $res = $this->client->call(Client::METHOD_DELETE, '/users/' . $userId, $headers); $this->assertEmpty($res['body']); @@ -102,25 +106,33 @@ class UsageTest extends Scope 'x-appwrite-mode' => 'admin', ]; - $res = $this->client->call(Client::METHOD_GET, '/project/usage?range=30d', $consoleHeaders); + $res = $this->client->call( + Client::METHOD_GET, + '/project/usage?range=24h', + $consoleHeaders + ); $res = $res['body']; - $this->assertEquals('30d', $res['range']); + $this->assertEquals('24h', $res['range']); $this->assertEquals(9, count($res)); - $this->assertEquals(30, count($res['requests'])); - $this->assertEquals(30, count($res['users'])); + $this->assertEquals(24, count($res['requests'])); + $this->assertEquals(24, count($res['users'])); $this->assertEquals($usersCount, $res['users'][array_key_last($res['users'])]['value']); $this->validateDates($res['users']); $this->assertEquals($requestsCount, $res['requests'][array_key_last($res['requests'])]['value']); $this->validateDates($res['requests']); - $res = $this->client->call(Client::METHOD_GET, '/users/usage?range=90d', $consoleHeaders); + $res = $this->client->call( + Client::METHOD_GET, + '/users/usage?range=90d', + $consoleHeaders + ); $res = $res['body']; $this->assertEquals('90d', $res['range']); $this->assertEquals(90, count($res['usersCount'])); $this->assertEquals(90, count($res['sessionsCount'])); - $this->assertEquals(5, $res['usersCount'][array_key_last($res['usersCount'])]['value']); + $this->assertEquals((self::CREATE / 2), $res['usersCount'][array_key_last($res['usersCount'])]['value']); return [ 'projectId' => $projectId, @@ -133,22 +145,23 @@ class UsageTest extends Scope /** @depends testUsersStats */ public function testPrepareStorageStats(array $data): array { - - $projectId = $data['projectId']; - $consoleHeaders = $data['consoleHeaders']; $headers = $data['headers']; $bucketsCount = 0; $requestsCount = $data['requestsCount']; $storageTotal = 0; - $bucketsCreate = 0; - $bucketsDelete = 0; $filesCount = 0; - $filesCreate = 0; - $filesDelete = 0; - for ($i = 0; $i < 10; $i++) { + + for ($i = 0; $i < self::CREATE; $i++) { $name = uniqid() . ' bucket'; - $res = $this->client->call(Client::METHOD_POST, '/storage/buckets', array_merge($headers, ['content-type' => 'multipart/form-data']), [ + $res = $this->client->call( + Client::METHOD_POST, + '/storage/buckets', + array_merge( + $headers, + ['content-type' => 'multipart/form-data'] + ), + [ 'bucketId' => 'unique()', 'name' => $name, 'fileSecurity' => false, @@ -158,18 +171,21 @@ class UsageTest extends Scope Permission::update(Role::any()), Permission::delete(Role::any()), ], - ]); + ] + ); $this->assertEquals($name, $res['body']['name']); $this->assertNotEmpty($res['body']['$id']); $bucketId = $res['body']['$id']; - $bucketsCreate++; $bucketsCount++; $requestsCount++; - if ($i < 5) { - $res = $this->client->call(Client::METHOD_DELETE, '/storage/buckets/' . $bucketId, $headers); + if ($i < (self::CREATE / 2)) { + $res = $this->client->call( + Client::METHOD_DELETE, + '/storage/buckets/' . $bucketId, + $headers + ); $this->assertEmpty($res['body']); - $bucketsDelete++; $requestsCount++; $bucketsCount--; } @@ -195,27 +211,34 @@ class UsageTest extends Scope ], ]; - for ($i = 0; $i < 10; $i++) { + for ($i = 0; $i < self::CREATE; $i++) { $file = $files[$i % count($files)]; - $res = $this->client->call(Client::METHOD_POST, '/storage/buckets/' . $bucketId . '/files', array_merge($headers, ['content-type' => 'multipart/form-data']), [ + $res = $this->client->call( + Client::METHOD_POST, + '/storage/buckets/' . $bucketId . '/files', + array_merge($headers, ['content-type' => 'multipart/form-data']), + [ 'fileId' => 'unique()', 'file' => new CURLFile($file['path'], '', $file['name']), - ]); + ] + ); $this->assertNotEmpty($res['body']['$id']); $fileSize = $res['body']['sizeOriginal']; $storageTotal += $fileSize; $filesCount++; - $filesCreate++; $requestsCount++; $fileId = $res['body']['$id']; - if ($i < 5) { - $res = $this->client->call(Client::METHOD_DELETE, '/storage/buckets/' . $bucketId . '/files/' . $fileId, $headers); + if ($i < (self::CREATE / 2)) { + $res = $this->client->call( + Client::METHOD_DELETE, + '/storage/buckets/' . $bucketId . '/files/' . $fileId, + $headers + ); $this->assertEmpty($res['body']); - $filesDelete++; $requestsCount++; $filesCount--; $storageTotal -= $fileSize; @@ -227,11 +250,7 @@ class UsageTest extends Scope 'bucketsCount' => $bucketsCount, 'requestsCount' => $requestsCount, 'storageTotal' => $storageTotal, - 'bucketsCreate' => $bucketsCreate, - 'bucketsDelete' => $bucketsDelete, 'filesCount' => $filesCount, - 'filesCreate' => $filesCreate, - 'filesDelete' => $filesDelete, ]); } @@ -248,7 +267,14 @@ class UsageTest extends Scope sleep(self::WAIT); - $res = $this->client->call(Client::METHOD_GET, '/project/usage?range=30d', array_merge($data['headers'], $data['consoleHeaders'])); + $res = $this->client->call( + Client::METHOD_GET, + '/project/usage?range=30d', + array_merge( + $data['headers'], + $data['consoleHeaders'] + ) + ); $res = $res['body']; $this->assertEquals(9, count($res)); @@ -260,7 +286,14 @@ class UsageTest extends Scope $this->assertEquals($storageTotal, $res['storage'][array_key_last($res['storage'])]['value']); $this->validateDates($res['storage']); - $res = $this->client->call(Client::METHOD_GET, '/storage/usage?range=30d', array_merge($data['headers'], $data['consoleHeaders'])); + $res = $this->client->call( + Client::METHOD_GET, + '/storage/usage?range=30d', + array_merge( + $data['headers'], + $data['consoleHeaders'] + ) + ); $res = $res['body']; $this->assertEquals($storageTotal, $res['filesStorage'][array_key_last($res['filesStorage'])]['value']); @@ -270,7 +303,14 @@ class UsageTest extends Scope $this->assertEquals($filesCount, $res['filesCount'][array_key_last($res['filesCount'])]['value']); $this->validateDates($res['filesCount']); - $res = $this->client->call(Client::METHOD_GET, '/storage/' . $bucketId . '/usage?range=30d', array_merge($data['headers'], $data['consoleHeaders'])); + $res = $this->client->call( + Client::METHOD_GET, + '/storage/' . $bucketId . '/usage?range=30d', + array_merge( + $data['headers'], + $data['consoleHeaders'] + ) + ); $res = $res['body']; $this->assertEquals($storageTotal, $res['filesStorage'][array_key_last($res['filesStorage'])]['value']); @@ -291,12 +331,17 @@ class UsageTest extends Scope $collectionsCount = 0; $documentsCount = 0; - for ($i = 0; $i < 10; $i++) { + for ($i = 0; $i < self::CREATE; $i++) { $name = uniqid() . ' database'; - $res = $this->client->call(Client::METHOD_POST, '/databases', array_merge($headers, ['content-type' => 'multipart/form-data']), [ + $res = $this->client->call( + Client::METHOD_POST, + '/databases', + array_merge($headers, ['content-type' => 'multipart/form-data']), + [ 'databaseId' => 'unique()', 'name' => $name, - ]); + ] + ); $this->assertEquals($name, $res['body']['name']); @@ -306,8 +351,12 @@ class UsageTest extends Scope $requestsCount++; $databasesCount++; - if ($i < 5) { - $res = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, $headers); + if ($i < (self::CREATE / 2)) { + $res = $this->client->call( + Client::METHOD_DELETE, + '/databases/' . $databaseId, + $headers + ); $this->assertEmpty($res['body']); $databasesCount--; @@ -315,9 +364,13 @@ class UsageTest extends Scope } } - for ($i = 0; $i < 10; $i++) { + for ($i = 0; $i < self::CREATE; $i++) { $name = uniqid() . ' collection'; - $res = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge($headers, ['content-type' => 'multipart/form-data']), [ + $res = $this->client->call( + Client::METHOD_POST, + '/databases/' . $databaseId . '/collections', + array_merge($headers, ['content-type' => 'multipart/form-data']), + [ 'collectionId' => 'unique()', 'name' => $name, 'documentSecurity' => false, @@ -327,7 +380,8 @@ class UsageTest extends Scope Permission::update(Role::any()), Permission::delete(Role::any()), ], - ]); + ] + ); $this->assertEquals($name, $res['body']['name']); $this->assertNotEmpty($res['body']['$id']); @@ -336,31 +390,45 @@ class UsageTest extends Scope $requestsCount++; $collectionsCount++; - if ($i < 5) { - $res = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId, $headers); + if ($i < (self::CREATE / 2)) { + $res = $this->client->call( + Client::METHOD_DELETE, + '/databases/' . $databaseId . '/collections/' . $collectionId, + $headers + ); $this->assertEmpty($res['body']); $collectionsCount--; $requestsCount++; } } - $res = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes' . '/string', array_merge($headers, ['content-type' => 'multipart/form-data']), [ + $res = $this->client->call( + Client::METHOD_POST, + '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes' . '/string', + array_merge($headers, ['content-type' => 'multipart/form-data']), + [ 'key' => 'name', 'size' => 255, 'required' => true, - ]); + ] + ); $this->assertEquals('name', $res['body']['key']); $requestsCount++; sleep(self::WAIT); - for ($i = 0; $i < 10; $i++) { + for ($i = 0; $i < self::CREATE; $i++) { $name = uniqid() . ' collection'; - $res = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge($headers, ['content-type' => 'multipart/form-data']), [ + $res = $this->client->call( + Client::METHOD_POST, + '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', + array_merge($headers, ['content-type' => 'multipart/form-data']), + [ 'documentId' => 'unique()', 'data' => ['name' => $name] - ]); + ] + ); $this->assertEquals($name, $res['body']['name']); $this->assertNotEmpty($res['body']['$id']); $documentId = $res['body']['$id']; @@ -368,15 +436,19 @@ class UsageTest extends Scope $requestsCount++; $documentsCount++; - if ($i < 5) { - $res = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId, $headers); + if ($i < (self::CREATE / 2)) { + $res = $this->client->call( + Client::METHOD_DELETE, + '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId, + $headers + ); $this->assertEmpty($res['body']); $documentsCount--; $requestsCount++; } } - $data = array_merge($data, [ + return array_merge($data, [ 'databaseId' => $databaseId, 'collectionId' => $collectionId, 'requestsCount' => $requestsCount, @@ -384,8 +456,6 @@ class UsageTest extends Scope 'collectionsCount' => $collectionsCount, 'documentsCount' => $documentsCount, ]); - - return $data; } /** @depends testPrepareDatabaseStats */ @@ -403,7 +473,11 @@ class UsageTest extends Scope sleep(self::WAIT); - $res = $this->client->call(Client::METHOD_GET, '/project/usage?range=30d', $data['consoleHeaders']); + $res = $this->client->call( + Client::METHOD_GET, + '/project/usage?range=30d', + $data['consoleHeaders'] + ); $res = $res['body']; $this->assertEquals(9, count($res)); @@ -416,7 +490,11 @@ class UsageTest extends Scope $this->assertEquals($documentsCount, $res['documents'][array_key_last($res['documents'])]['value']); $this->validateDates($res['documents']); - $res = $this->client->call(Client::METHOD_GET, '/databases/usage?range=30d', $data['consoleHeaders']); + $res = $this->client->call( + Client::METHOD_GET, + '/databases/usage?range=30d', + $data['consoleHeaders'] + ); $res = $res['body']; $this->assertEquals($databasesCount, $res['databasesCount'][array_key_last($res['databasesCount'])]['value']); @@ -426,7 +504,11 @@ class UsageTest extends Scope $this->assertEquals($documentsCount, $res['documentsCount'][array_key_last($res['documentsCount'])]['value']); $this->validateDates($res['documentsCount']); - $res = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/usage?range=30d', $data['consoleHeaders']); + $res = $this->client->call( + Client::METHOD_GET, + '/databases/' . $databaseId . '/usage?range=30d', + $data['consoleHeaders'] + ); $res = $res['body']; $this->assertEquals($collectionsCount, $res['collectionsCount'][array_key_last($res['collectionsCount'])]['value']); @@ -451,12 +533,15 @@ class UsageTest extends Scope public function testPrepareFunctionsStats(array $data): array { $headers = $data['headers']; - $functionId = ''; $executionTime = 0; $executions = 0; $failures = 0; - $response1 = $this->client->call(Client::METHOD_POST, '/functions', $headers, [ + $response1 = $this->client->call( + Client::METHOD_POST, + '/functions', + $headers, + [ 'functionId' => 'unique()', 'name' => 'Test', 'runtime' => 'php-8.0', @@ -471,7 +556,8 @@ class UsageTest extends Scope ], 'schedule' => '0 0 1 1 *', 'timeout' => 10, - ]); + ] + ); $functionId = $response1['body']['$id'] ?? ''; @@ -481,11 +567,16 @@ class UsageTest extends Scope $code = realpath(__DIR__ . '/../../resources/functions') . "/php/code.tar.gz"; $this->packageCode('php'); - $deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/deployments', array_merge($headers, ['content-type' => 'multipart/form-data',]), [ + $deployment = $this->client->call( + Client::METHOD_POST, + '/functions/' . $functionId . '/deployments', + array_merge($headers, ['content-type' => 'multipart/form-data',]), + [ 'entrypoint' => 'index.php', 'code' => new CURLFile($code, 'application/x-gzip', \basename($code)), 'activate' => true - ]); + ] + ); $deploymentId = $deployment['body']['$id'] ?? ''; @@ -497,7 +588,11 @@ class UsageTest extends Scope // Wait for deployment to build. sleep(self::WAIT + 20); - $response = $this->client->call(Client::METHOD_PATCH, '/functions/' . $functionId . '/deployments/' . $deploymentId, $headers); + $response = $this->client->call( + Client::METHOD_PATCH, + '/functions/' . $functionId . '/deployments/' . $deploymentId, + $headers + ); $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); @@ -505,9 +600,14 @@ class UsageTest extends Scope $this->assertEquals(true, DateTime::isValid($response['body']['$updatedAt'])); $this->assertEquals($deploymentId, $response['body']['deployment']); - $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', $headers, [ + $execution = $this->client->call( + Client::METHOD_POST, + '/functions/' . $functionId . '/executions', + $headers, + [ 'async' => false, - ]); + ] + ); $this->assertEquals(201, $execution['headers']['status-code']); $this->assertNotEmpty($execution['body']['$id']); @@ -521,9 +621,14 @@ class UsageTest extends Scope $executions++; } - $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', $headers, [ + $execution = $this->client->call( + Client::METHOD_POST, + '/functions/' . $functionId . '/executions', + $headers, + [ 'async' => false, - ]); + ] + ); $this->assertEquals(201, $execution['headers']['status-code']); $this->assertNotEmpty($execution['body']['$id']); @@ -535,9 +640,14 @@ class UsageTest extends Scope } $executionTime += (int) ($execution['body']['duration'] * 1000); - $execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', $headers, [ + $execution = $this->client->call( + Client::METHOD_POST, + '/functions/' . $functionId . '/executions', + $headers, + [ 'async' => true, - ]); + ] + ); $this->assertEquals(202, $execution['headers']['status-code']); $this->assertNotEmpty($execution['body']['$id']); @@ -545,7 +655,11 @@ class UsageTest extends Scope sleep(self::WAIT); - $execution = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $execution['body']['$id'], $headers); + $execution = $this->client->call( + Client::METHOD_GET, + '/functions/' . $functionId . '/executions/' . $execution['body']['$id'], + $headers + ); if ($execution['body']['status'] == 'failed') { $failures++; @@ -555,29 +669,28 @@ class UsageTest extends Scope $executionTime += (int) ($execution['body']['duration'] * 1000); - $data = array_merge($data, [ + return array_merge($data, [ 'functionId' => $functionId, 'executionTime' => $executionTime, 'executions' => $executions, 'failures' => $failures, ]); - - return $data; } /** @depends testPrepareFunctionsStats */ public function testFunctionsStats(array $data): void { - $headers = $data['headers']; $functionId = $data['functionId']; $executionTime = $data['executionTime']; $executions = $data['executions']; - $failures = $data['failures']; - sleep(self::WAIT); - $response = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/usage?range=30d', $data['consoleHeaders']); + $response = $this->client->call( + Client::METHOD_GET, + '/functions/' . $functionId . '/usage?range=30d', + $data['consoleHeaders'] + ); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(7, count($response['body'])); @@ -597,7 +710,11 @@ class UsageTest extends Scope $this->assertEquals($executionTime, $response['executionsCompute'][array_key_last($response['executionsCompute'])]['value']); $this->validateDates($response['executionsCompute']); - $response = $this->client->call(Client::METHOD_GET, '/functions/usage?range=30d', $data['consoleHeaders']); + $response = $this->client->call( + Client::METHOD_GET, + '/functions/usage?range=30d', + $data['consoleHeaders'] + ); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(8, count($response['body'])); From e748bb20e4fbabeb599c70a609eabc0df9aad858 Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 15 Dec 2022 19:38:25 +0200 Subject: [PATCH 28/94] benchmarks --- bin/benchmark | 3 + phpbench.json | 17 ++ tests/benchmarks/Scopes/Scope.php | 14 ++ tests/benchmarks/Services/Databases/Base.php | 151 ++++++++++++++++++ .../Databases/DatabasesCustomClientBench.php | 10 ++ .../Databases/DatabasesCustomServerBench.php | 10 ++ tests/benchmarks/Services/Functions/Base.php | 113 +++++++++++++ .../Functions/FunctionsCustomClientBench.php | 10 ++ .../Functions/FunctionsCustomServerBench.php | 21 +++ tests/benchmarks/Services/Storage/Base.php | 116 ++++++++++++++ .../Storage/StorageCustomClientBench.php | 10 ++ .../Storage/StorageCustomServerBench.php | 10 ++ .../Services/Users/UserCustomServerBench.php | 94 +++++++++++ tests/benchmarks/http.js | 34 ---- tests/benchmarks/ws.js | 59 ------- 15 files changed, 579 insertions(+), 93 deletions(-) create mode 100644 bin/benchmark create mode 100644 phpbench.json create mode 100644 tests/benchmarks/Scopes/Scope.php create mode 100644 tests/benchmarks/Services/Databases/Base.php create mode 100644 tests/benchmarks/Services/Databases/DatabasesCustomClientBench.php create mode 100644 tests/benchmarks/Services/Databases/DatabasesCustomServerBench.php create mode 100644 tests/benchmarks/Services/Functions/Base.php create mode 100644 tests/benchmarks/Services/Functions/FunctionsCustomClientBench.php create mode 100644 tests/benchmarks/Services/Functions/FunctionsCustomServerBench.php create mode 100644 tests/benchmarks/Services/Storage/Base.php create mode 100644 tests/benchmarks/Services/Storage/StorageCustomClientBench.php create mode 100644 tests/benchmarks/Services/Storage/StorageCustomServerBench.php create mode 100644 tests/benchmarks/Services/Users/UserCustomServerBench.php delete mode 100644 tests/benchmarks/http.js delete mode 100644 tests/benchmarks/ws.js diff --git a/bin/benchmark b/bin/benchmark new file mode 100644 index 000000000..de9bee100 --- /dev/null +++ b/bin/benchmark @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +/usr/src/code/vendor/bin/phpbench run --config /usr/src/code/phpbench.json --report appwrite $@ \ No newline at end of file diff --git a/phpbench.json b/phpbench.json new file mode 100644 index 000000000..4ebdc080b --- /dev/null +++ b/phpbench.json @@ -0,0 +1,17 @@ +{ + "$schema": "./vendor/phpbench/phpbench/phpbench.schema.json", + "runner.path": "tests/benchmarks", + "runner.file_pattern": "*Bench.php", + "runner.bootstrap": "app/init.php", + "runner.revs": 1000, + "runner.iterations": 3, + "runner.retry_threshold": 5, + "runner.warmup": 1, + "report.generators": { + "appwrite": { + "extends": "aggregate", + "cols": ["benchmark", "subject", "set" ,"revs", "its", "worst", "best", "mean", "mode", "rstdev"], + "break": ["benchmark"] + } + } +} \ No newline at end of file diff --git a/tests/benchmarks/Scopes/Scope.php b/tests/benchmarks/Scopes/Scope.php new file mode 100644 index 000000000..03b2d7f1e --- /dev/null +++ b/tests/benchmarks/Scopes/Scope.php @@ -0,0 +1,14 @@ +client->call(Client::METHOD_POST, '/databases/' . static::$databaseId . '/collections/' . static::$collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'title' => 'The Matrix', + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::write(Role::user($this->getUser()['$id'])), + ], + ]); + } + + #[ParamProviders(['provideCounts'])] + #[BeforeMethods(['createDatabase', 'createCollection', 'createDocuments'])] + public function benchDocumentReadList(array $params) + { + $this->client->call(Client::METHOD_GET, '/databases/' . static::$databaseId . '/collections/' . static::$collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => ['limit(' . $params['documents'] . ')'], + ]); + } + + #[BeforeMethods(['createDatabase', 'createCollection', 'createDocuments'])] + public function benchDocumentRead() + { + $this->client->call(Client::METHOD_GET, '/databases/' . static::$databaseId . '/collections/' . static::$collectionId . '/documents/' . static::$documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + } + + #[BeforeMethods(['createDatabase', 'createCollection', 'createDocuments'])] + public function benchDocumentUpdate() + { + $this->client->call(Client::METHOD_PATCH, '/databases/' . static::$databaseId . '/collections/' . static::$collectionId . '/documents/' . static::$documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'The Matrix Reloaded', + ], + ]); + } + + public function provideCounts(): array + { + return [ + '1 Document' => ['documents' => 1], + '10 Documents' => ['documents' => 10], + '100 Documents' => ['documents' => 100], + ]; + } + + public function createDatabase(array $params = []) + { + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Test Database' + ]); + static::$databaseId = $database['body']['$id']; + } + + public function createCollection(array $params = []) + { + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . static::$databaseId . '/collections', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'collectionId' => ID::unique(), + 'name' => 'Movies', + 'documentSecurity' => true, + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::write(Role::user($this->getUser()['$id'])), + ], + ]); + static::$collectionId = $collection['body']['$id']; + + // Create attribute + $this->client->call(Client::METHOD_POST, '/databases/' . static::$databaseId . '/collections/' . static::$collectionId . '/attributes/string', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'key' => 'title', + 'size' => 256, + 'required' => true, + ]); + + // Wait for attribute to be ready + sleep(2); + } + + public function createDocuments(array $params = []) + { + $count = $params['documents'] ?? 1; + + for ($i = 0; $i < $count; $i++) { + $response = $this->client->call(Client::METHOD_POST, '/databases/' . static::$databaseId . '/collections/' . static::$collectionId . '/documents', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'documentId' => ID::unique(), + 'data' => [ + 'title' => 'Captain America' . $i, + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::write(Role::user($this->getUser()['$id'])), + ] + ]); + + static::$documentId = $response['body']['$id']; + } + } +} diff --git a/tests/benchmarks/Services/Databases/DatabasesCustomClientBench.php b/tests/benchmarks/Services/Databases/DatabasesCustomClientBench.php new file mode 100644 index 000000000..658ddfd98 --- /dev/null +++ b/tests/benchmarks/Services/Databases/DatabasesCustomClientBench.php @@ -0,0 +1,10 @@ +client->call(Client::METHOD_POST, '/functions/' . static::$functionId . '/executions', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + } + + public function createFunction() + { + $response = $this->client->call(Client::METHOD_POST, '/functions', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'functionId' => ID::unique(), + 'name' => 'Test', + 'runtime' => 'php-8.0', + 'timeout' => 10, + 'execute' => [Role::users()->toString()] + ]); + static::$functionId = $response['body']['$id']; + } + + public function prepareDeployment() + { + $stdout = ''; + $stderr = ''; + + Console::execute( + 'cd ' . realpath(__DIR__ . "/../../resources/functions/php") . " && \ + tar --exclude code.tar.gz -czf code.tar.gz .", + '', + $stdout, + $stderr + ); + } + + public function createDeployment() + { + $code = realpath(__DIR__ . '/../../resources/functions/php/code.tar.gz'); + + $response = $this->client->call(Client::METHOD_POST, '/functions/' . static::$functionId . '/deployments', [ + 'content-type' => 'multipart/form-data', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'entrypoint' => 'index.php', + 'code' => new CURLFile( + $code, + 'application/x-gzip', + \basename($code) + ), + ]); + + static::$deploymentId = $response['body']['$id']; + + while (true) { + $response = $this->client->call(Client::METHOD_GET, '/functions/' . static::$functionId . '/deployments/' . static::$deploymentId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + $status = $response['body']['status'] ?? ''; + + switch ($status) { + case '': + case 'processing': + case 'building': + usleep(200); + break; + case 'ready': + break 2; + case 'failed': + throw new \Exception('Failed to build function'); + } + } + + sleep(1); + } + + public function patchDeployment() + { + $this->client->call(Client::METHOD_PATCH, '/functions/' . static::$functionId . '/deployments/' . static::$deploymentId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], []); + } +} diff --git a/tests/benchmarks/Services/Functions/FunctionsCustomClientBench.php b/tests/benchmarks/Services/Functions/FunctionsCustomClientBench.php new file mode 100644 index 000000000..ec5e0b8f2 --- /dev/null +++ b/tests/benchmarks/Services/Functions/FunctionsCustomClientBench.php @@ -0,0 +1,10 @@ +createDeployment(); + } +} diff --git a/tests/benchmarks/Services/Storage/Base.php b/tests/benchmarks/Services/Storage/Base.php new file mode 100644 index 000000000..64a8ccaec --- /dev/null +++ b/tests/benchmarks/Services/Storage/Base.php @@ -0,0 +1,116 @@ +client->call(Client::METHOD_POST, '/storage/buckets/' . static::$bucketId . '/files', array_merge([ + 'content-type' => 'multipart/form-data', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'fileId' => ID::unique(), + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::write(Role::user($this->getUser()['$id'])), + ], + 'file' => new CURLFile(realpath(__DIR__ . '/../../resources/logo.png'), 'image/png', 'logo.png'), + ]); + } + + #[ParamProviders(['provideCounts'])] + #[BeforeMethods(['createBucket', 'createFiles'])] + public function benchFileReadList(array $params) + { + $this->client->call(Client::METHOD_GET, '/storage/buckets/' . static::$bucketId . '/files', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => ['limit(' . $params['files'] . ')'], + ]); + } + + #[BeforeMethods(['createBucket', 'createFiles'])] + public function benchFileRead() + { + $this->client->call(Client::METHOD_GET, '/storage/buckets/' . static::$bucketId . '/files/' . static::$fileId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + } + + #[BeforeMethods(['createBucket', 'createFiles'])] + public function benchFileUpdate() + { + $this->client->call(Client::METHOD_PUT, '/storage/buckets/' . static::$bucketId . '/files/' . static::$fileId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'name' => 'Updated name', + 'permissions' => [], + ]); + } + + public function provideCounts(): array + { + return [ + '10 Files' => ['files' => 10], + '100 Files' => ['files' => 100], + ]; + } + + public function createBucket(array $params = []) + { + // Create bucket + $bucket = $this->client->call(Client::METHOD_POST, '/storage/buckets', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'bucketId' => ID::unique(), + 'name' => 'Test Bucket', + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::write(Role::user($this->getUser()['$id'])), + ], + 'fileSecurity' => true + ]); + static::$bucketId = $bucket['body']['$id']; + } + + public function createFiles(array $params = []) + { + $count = $params['files'] ?? 1; + + // Create files + for ($i = 0; $i < $count; $i++) { + $response = $this->client->call(Client::METHOD_POST, '/storage/buckets/' . static::$bucketId . '/files', [ + 'content-type' => 'multipart/form-data', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'fileId' => ID::unique(), + 'file' => new CURLFile(realpath(__DIR__ . '/../../resources/logo.png'), 'image/png', 'logo.png'), + ]); + + static::$fileId = $response['body']['$id']; + } + } +} diff --git a/tests/benchmarks/Services/Storage/StorageCustomClientBench.php b/tests/benchmarks/Services/Storage/StorageCustomClientBench.php new file mode 100644 index 000000000..585182c1d --- /dev/null +++ b/tests/benchmarks/Services/Storage/StorageCustomClientBench.php @@ -0,0 +1,10 @@ +client->call(Client::METHOD_POST, '/users', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'userId' => $id, + 'email' => 'test' . $id . '@example.com', + 'password' => 'password', + ]); + } + + #[ParamProviders(['provideCounts'])] + #[BeforeMethods(['createUsers'])] + public function benchUserReadList(array $params) + { + $this->client->call(Client::METHOD_GET, '/users', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => ['limit(' . $params['users'] . ')'], + ]); + } + + #[BeforeMethods(['createUsers'])] + public function benchUserRead() + { + $this->client->call(Client::METHOD_GET, '/users/' . static::$userId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + } + + #[BeforeMethods(['createUsers'])] + public function benchUserUpdate() + { + $this->client->call(Client::METHOD_PUT, '/users/' . static::$userId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'name' => 'New Name', + ]); + } + + public function createUsers(array $params = []) + { + $count = $params['documents'] ?? 1; + + for ($i = 0; $i < $count; $i++) { + $id = ID::unique(); + + $response = $this->client->call(Client::METHOD_POST, '/users', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'userId' => $id, + 'email' => 'test' . $id . '@example.com', + 'password' => 'password', + ]); + + static::$userId = $response['body']['$id']; + } + } + + public function provideCounts(): array + { + return [ + '1 User' => ['users' => 1], + '10 Users' => ['users' => 10], + '100 Users' => ['users' => 100], + ]; + } +} diff --git a/tests/benchmarks/http.js b/tests/benchmarks/http.js deleted file mode 100644 index 799c8fb23..000000000 --- a/tests/benchmarks/http.js +++ /dev/null @@ -1,34 +0,0 @@ -import http from 'k6/http'; -import { check } from 'k6'; -import { Counter } from 'k6/metrics'; - -// A simple counter for http requests -export const requests = new Counter('http_reqs'); - -// you can specify stages of your test (ramp up/down patterns) through the options object -// target is the number of VUs you are aiming for - -export const options = { - stages: [ - { target: 50, duration: '1m' }, - // { target: 15, duration: '1m' }, - // { target: 0, duration: '1m' }, - ], - thresholds: { - requests: ['count < 100'], - }, -}; - -export default function () { - const config = { - headers: { - 'X-Appwrite-Key': '24356eb021863f81eb7dd77c7750304d0464e141cad6e9a8befa1f7d2b066fde190df3dab1e8d2639dbb82ee848da30501424923f4cd80d887ee40ad77ded62763ee489448523f6e39667f290f9a54b2ab8fad131a0bc985e6c0f760015f7f3411e40626c75646bb19d2bb2f7bf2f63130918220a206758cbc48845fd725a695', - 'X-Appwrite-Project': '60479fe35d95d' - }} - - const resDb = http.get('http://localhost:9501/', config); - - check(resDb, { - 'status is 200': (r) => r.status === 200, - }); -} \ No newline at end of file diff --git a/tests/benchmarks/ws.js b/tests/benchmarks/ws.js deleted file mode 100644 index 916458856..000000000 --- a/tests/benchmarks/ws.js +++ /dev/null @@ -1,59 +0,0 @@ -// k6 run tests/benchmarks/ws.js - -import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'; -import ws from 'k6/ws'; -import { check } from 'k6'; - -export let options = { - stages: [ - { - duration: '10s', - target: 500 - }, - { - duration: '1m', - target: 500 - }, - ], -} - -export default function () { - // const url = new URL('wss://appwrite-realtime.monitor-api.com/v1/realtime'); - // url.searchParams.append('project', '604249e6b1a9f'); - const url = new URL('ws://localhost/v1/realtime'); - url.searchParams.append('project', 'console'); - url.searchParams.append('channels[]', 'files'); - - const res = ws.connect(url.toString(), function (socket) { - let connection = false; - let checked = false; - let payload = null; - socket.on('open', () => { - connection = true; - }); - - socket.on('message', (data) => { - payload = data; - checked = true; - }); - - socket.setTimeout(function () { - check(payload, { - 'connection opened': (r) => connection, - 'message received': (r) => checked, - 'channels are right': (r) => r === JSON.stringify({ - "type": "connected", - "data": { - "channels": [ - "files" - ], - "user": null - } - }) - }) - socket.close(); - }, 5000); - }); - - check(res, { 'status is 101': (r) => r && r.status === 101 }); -} \ No newline at end of file From 18f192ed65d7fdea73970678c6e6e15e8a3878f8 Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 19 Dec 2022 10:25:49 +0200 Subject: [PATCH 29/94] benchmarks --- app/controllers/api/functions.php | 2 +- app/controllers/shared/api.php | 5 +- app/controllers/shared/api/auth.php | 2 +- app/workers/usage.php | 30 +- composer.json | 26 +- composer.lock | 2125 ++++++++++++------ docker-compose.yml | 1 + src/Appwrite/Event/Usage.php | 2 +- tests/benchmarks/Services/Functions/Base.php | 4 +- tests/benchmarks/Services/Storage/Base.php | 5 +- tests/e2e/General/UsageTest.php | 4 +- tests/e2e/Scopes/Scope.php | 4 +- 12 files changed, 1504 insertions(+), 706 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 90d80adb2..2c3ca19d3 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -482,7 +482,6 @@ App::post('/v1/functions/:functionId/deployments') // Save to storage $fileSize ??= $deviceLocal->getFileSize($fileTmpName); $path = $deviceFunctions->getPath($deploymentId . '.' . \pathinfo($fileName, PATHINFO_EXTENSION)); - $deployment = $dbForProject->getDocument('deployments', $deploymentId); $metadata = ['content_type' => $deviceLocal->getFileMimeType($fileTmpName)]; @@ -1002,6 +1001,7 @@ App::post('/v1/functions/:functionId/executions') ->addMetric('executions.compute', (int)($executionResponse['duration'] * 1000))// per project ->addMetric("{$function->getId()}" . ".executions.compute", (int)($executionResponse['duration'] * 1000))// per function ; + } catch (\Throwable $th) { $interval = (new \DateTime())->diff(new \DateTime($execution->getCreatedAt())); $execution diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 86ab54c41..0ffed039c 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -186,7 +186,7 @@ $databaseListener = function (string $event, array $args, Document $project, Usa break; } } catch (Throwable $error) { - if (!empty($logger) && $error->getCode() === 500) { + if (!empty($logger)) { $log = new Log(); $isProduction = App::getEnv('_APP_ENV', 'development') === 'production'; $log @@ -552,7 +552,8 @@ App::shutdown() } if ( - $project->getId() !== 'console' && $mode !== APP_MODE_ADMIN + $project->getId() !== 'console' + //&& $mode !== APP_MODE_ADMIN ) { $fileSize = 0; $file = $request->getFiles('file'); diff --git a/app/controllers/shared/api/auth.php b/app/controllers/shared/api/auth.php index a6c47579a..5b1af0d36 100644 --- a/app/controllers/shared/api/auth.php +++ b/app/controllers/shared/api/auth.php @@ -59,4 +59,4 @@ App::init() throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Unsupported authentication route'); break; } - }); \ No newline at end of file + }); diff --git a/app/workers/usage.php b/app/workers/usage.php index 2a1d1ef40..b408e9f2c 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -54,7 +54,7 @@ $server Timer::tick(3000, function () use ($register, $cache, $pools, $periods, &$stats) { $slice = array_slice($stats, 0, count($stats)); array_splice($stats, 0, count($stats)); - $log = []; + //$log = []; foreach ($slice as $metric) { if ($metric['value'] == 0) { @@ -100,14 +100,14 @@ $server } } - $log[] = [ - 'id' => $id, - 'period' => $period, - 'time' => $time, - 'metric' => $metric['key'], - 'value' => $metric['value'], - 'region' => App::getEnv('_APP_REGION', 'default'), - ]; +// $log[] = [ +// 'id' => $id, +// 'period' => $period, +// 'time' => $time, +// 'metric' => $metric['key'], +// 'value' => $metric['value'], +// 'region' => App::getEnv('_APP_REGION', 'default'), +// ]; } catch (\Exception $e) { console::error($e->getMessage()); } finally { @@ -115,12 +115,12 @@ $server } } - if (!empty($log)) { - $dbForProject->createDocument('statsLogger', new Document([ - 'time' => DateTime::now(), - 'metrics' => $log, - ])); - } +// if (!empty($log)) { +// $dbForProject->createDocument('statsLogger', new Document([ +// 'time' => DateTime::now(), +// 'metrics' => $log, +// ])); +// } } }); }); diff --git a/composer.json b/composer.json index 77812ce9b..c95232d2b 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,19 @@ "scripts": { "test": "vendor/bin/phpunit", "lint": "vendor/bin/phpcs", - "format": "vendor/bin/phpcbf" + "format": "vendor/bin/phpcbf", + "benchmark": [ + "Composer\\Config::disableProcessTimeout", + "vendor/bin/phpbench run --report=appwrite --" + ], + "benchmark-tag": [ + "Composer\\Config::disableProcessTimeout", + "vendor/bin/phpbench run --report=appwrite --tag=baseline --" + ], + "benchmark-compare": [ + "Composer\\Config::disableProcessTimeout", + "vendor/bin/phpbench run --report=appwrite --ref=baseline --" + ] }, "autoload": { "psr-4": { @@ -24,6 +36,7 @@ "psr-4": { "Tests\\E2E\\": "tests/e2e", "Tests\\Unit\\": "tests/unit", + "Tests\\Benchmarks\\": "tests/benchmarks", "Appwrite\\Tests\\": "tests/extensions" } }, @@ -63,7 +76,7 @@ "utopia-php/logger": "0.3.*", "utopia-php/messaging": "0.1.*", "utopia-php/registry": "0.5.*", - "utopia-php/storage": "0.13.*", + "utopia-php/storage": "0.13.0", "utopia-php/swoole": "0.5.*", "utopia-php/websocket": "0.1.0", "resque/php-resque": "1.3.6", @@ -86,7 +99,14 @@ "phpunit/phpunit": "9.5.20", "squizlabs/php_codesniffer": "^3.6", "swoole/ide-helper": "4.8.9", - "textalk/websocket": "1.5.7" + "textalk/websocket": "1.5.7", + "phpbench/phpbench": "^1.2", + + "symfony/console": "^5.0", + "symfony/filesystem": "^5.0", + "symfony/finder": "^5.0", + "symfony/options-resolver": "^5.0", + "symfony/process": "^5.0" }, "provide": { "ext-phpiredis": "*" diff --git a/composer.lock b/composer.lock index 8e1ff6f8b..57ba2a114 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": "b18e5d7f124a30671d5562d700ff41e4", + "content-hash": "a38abc1452cd5f641e1cabfeeb41b524", "packages": [ { "name": "adhocore/jwt", @@ -479,403 +479,6 @@ ], "time": "2022-01-18T15:43:28+00:00" }, - { - "name": "guzzlehttp/guzzle", - "version": "7.5.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", - "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", - "shasum": "" - }, - "require": { - "ext-json": "*", - "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.9 || ^2.4", - "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0", - "symfony/deprecation-contracts": "^2.2 || ^3.0" - }, - "provide": { - "psr/http-client-implementation": "1.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "ext-curl": "*", - "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.29 || ^9.5.23", - "psr/log": "^1.1 || ^2.0 || ^3.0" - }, - "suggest": { - "ext-curl": "Required for CURL handler support", - "ext-intl": "Required for Internationalized Domain Name (IDN) support", - "psr/log": "Required for using the Log middleware" - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - }, - "branch-alias": { - "dev-master": "7.5-dev" - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Jeremy Lindblom", - "email": "jeremeamia@gmail.com", - "homepage": "https://github.com/jeremeamia" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "psr-18", - "psr-7", - "rest", - "web service" - ], - "support": { - "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.5.0" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", - "type": "tidelift" - } - ], - "time": "2022-08-28T15:39:27+00:00" - }, - { - "name": "guzzlehttp/promises", - "version": "1.5.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "b94b2807d85443f9719887892882d0329d1e2598" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", - "reference": "b94b2807d85443f9719887892882d0329d1e2598", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.5-dev" - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "support": { - "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.2" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", - "type": "tidelift" - } - ], - "time": "2022-08-28T14:55:35+00:00" - }, - { - "name": "guzzlehttp/psr7", - "version": "2.4.3", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "67c26b443f348a51926030c83481b85718457d3d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", - "reference": "67c26b443f348a51926030c83481b85718457d3d", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", - "ralouphie/getallheaders": "^3.0" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" - }, - "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - }, - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ], - "support": { - "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.4.3" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", - "type": "tidelift" - } - ], - "time": "2022-10-26T14:07:24+00:00" - }, - { - "name": "influxdb/influxdb-php", - "version": "1.15.2", - "source": { - "type": "git", - "url": "https://github.com/influxdata/influxdb-php.git", - "reference": "d6e59f4f04ab9107574fda69c2cbe36671253d03" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/influxdata/influxdb-php/zipball/d6e59f4f04ab9107574fda69c2cbe36671253d03", - "reference": "d6e59f4f04ab9107574fda69c2cbe36671253d03", - "shasum": "" - }, - "require": { - "guzzlehttp/guzzle": "^6.0|^7.0", - "php": "^5.5 || ^7.0 || ^8.0" - }, - "require-dev": { - "dms/phpunit-arraysubset-asserts": "^0.2.1", - "phpunit/phpunit": "^9.5" - }, - "suggest": { - "ext-curl": "Curl extension, needed for Curl driver", - "stefanotorresi/influxdb-php-async": "An asyncronous client for InfluxDB, implemented via ReactPHP." - }, - "type": "library", - "autoload": { - "psr-4": { - "InfluxDB\\": "src/InfluxDB" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Stephen Hoogendijk", - "email": "stephen@tca0.nl" - }, - { - "name": "Daniel Martinez", - "email": "danimartcas@hotmail.com" - }, - { - "name": "Gianluca Arbezzano", - "email": "gianarb92@gmail.com" - } - ], - "description": "InfluxDB client library for PHP", - "keywords": [ - "client", - "influxdata", - "influxdb", - "influxdb class", - "influxdb client", - "influxdb library", - "time series" - ], - "support": { - "issues": "https://github.com/influxdata/influxdb-php/issues", - "source": "https://github.com/influxdata/influxdb-php/tree/1.15.2" - }, - "time": "2020-12-26T17:45:17+00:00" - }, { "name": "jean85/pretty-package-versions", "version": "1.6.0", @@ -1262,166 +865,6 @@ ], "time": "2022-02-28T15:31:21+00:00" }, - { - "name": "psr/http-client", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", - "keywords": [ - "http", - "http-client", - "psr", - "psr-18" - ], - "support": { - "source": "https://github.com/php-fig/http-client/tree/master" - }, - "time": "2020-06-29T06:28:15+00:00" - }, - { - "name": "psr/http-factory", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "shasum": "" - }, - "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" - }, - "time": "2019-04-30T12:38:16+00:00" - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/master" - }, - "time": "2016-08-06T14:39:51+00:00" - }, { "name": "psr/log", "version": "1.1.4", @@ -1472,50 +915,6 @@ }, "time": "2021-05-03T11:20:27+00:00" }, - { - "name": "ralouphie/getallheaders", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/getallheaders.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "description": "A polyfill for getallheaders.", - "support": { - "issues": "https://github.com/ralouphie/getallheaders/issues", - "source": "https://github.com/ralouphie/getallheaders/tree/develop" - }, - "time": "2019-03-08T08:55:37+00:00" - }, { "name": "resque/php-resque", "version": "v1.3.6", @@ -1655,73 +1054,6 @@ }, "time": "2021-06-04T20:33:46+00:00" }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.3-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-25T10:21:52+00:00" - }, { "name": "symfony/polyfill-php80", "version": "v1.27.0", @@ -3243,6 +2575,125 @@ }, "time": "2022-09-22T09:15:54+00:00" }, + { + "name": "doctrine/annotations", + "version": "1.14.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "9e034d7a70032d422169f27d8759e8d84abb4f51" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/9e034d7a70032d422169f27d8759e8d84abb4f51", + "reference": "9e034d7a70032d422169f27d8759e8d84abb4f51", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^1 || ^2", + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^9 || ^10", + "phpstan/phpstan": "~1.4.10 || ^1.8.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "symfony/cache": "^4.4 || ^5.4 || ^6", + "vimeo/psalm": "^4.10" + }, + "suggest": { + "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/1.14.1" + }, + "time": "2022-12-12T12:46:12+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpunit/phpunit": "^7.5|^8.5|^9.5", + "psr/log": "^1|^2|^3" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/v1.0.0" + }, + "time": "2022-05-02T15:47:09+00:00" + }, { "name": "doctrine/instantiator", "version": "1.4.1", @@ -3313,6 +2764,84 @@ ], "time": "2022-03-03T08:28:38+00:00" }, + { + "name": "doctrine/lexer", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.0", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^10", + "phpstan/phpstan": "^1.3", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.11 || ^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/2.1.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2022-12-14T08:49:07+00:00" + }, { "name": "matthiasmullie/minify", "version": "1.3.70", @@ -3663,6 +3192,198 @@ }, "time": "2022-02-21T01:04:05+00:00" }, + { + "name": "phpbench/container", + "version": "2.2.1", + "source": { + "type": "git", + "url": "https://github.com/phpbench/container.git", + "reference": "6d555ff7174fca13f9b1ec0b4a089ed41d0ab392" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpbench/container/zipball/6d555ff7174fca13f9b1ec0b4a089ed41d0ab392", + "reference": "6d555ff7174fca13f9b1ec0b4a089ed41d0ab392", + "shasum": "" + }, + "require": { + "psr/container": "^1.0|^2.0", + "symfony/options-resolver": "^4.2 || ^5.0 || ^6.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.16", + "phpstan/phpstan": "^0.12.52", + "phpunit/phpunit": "^8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "PhpBench\\DependencyInjection\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Leech", + "email": "daniel@dantleech.com" + } + ], + "description": "Simple, configurable, service container.", + "support": { + "issues": "https://github.com/phpbench/container/issues", + "source": "https://github.com/phpbench/container/tree/2.2.1" + }, + "time": "2022-01-25T10:17:35+00:00" + }, + { + "name": "phpbench/dom", + "version": "0.3.2", + "source": { + "type": "git", + "url": "https://github.com/phpbench/dom.git", + "reference": "b013b717832ddbaadf2a40984b04bc66af9a7110" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpbench/dom/zipball/b013b717832ddbaadf2a40984b04bc66af9a7110", + "reference": "b013b717832ddbaadf2a40984b04bc66af9a7110", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "php": "^7.2||^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.18", + "phpstan/phpstan": "^0.12.83", + "phpunit/phpunit": "^8.0||^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpBench\\Dom\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Leech", + "email": "daniel@dantleech.com" + } + ], + "description": "DOM wrapper to simplify working with the PHP DOM implementation", + "support": { + "issues": "https://github.com/phpbench/dom/issues", + "source": "https://github.com/phpbench/dom/tree/0.3.2" + }, + "time": "2021-09-24T15:26:07+00:00" + }, + { + "name": "phpbench/phpbench", + "version": "1.2.7", + "source": { + "type": "git", + "url": "https://github.com/phpbench/phpbench.git", + "reference": "dce145304abbb16c8d9af69c19d96f47e9d0e670" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpbench/phpbench/zipball/dce145304abbb16c8d9af69c19d96f47e9d0e670", + "reference": "dce145304abbb16c8d9af69c19d96f47e9d0e670", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.13", + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "ext-tokenizer": "*", + "php": "^7.3 || ^8.0", + "phpbench/container": "^2.1", + "phpbench/dom": "~0.3.1", + "psr/log": "^1.1 || ^2.0 || ^3.0", + "seld/jsonlint": "^1.1", + "symfony/console": "^4.2 || ^5.0 || ^6.0", + "symfony/filesystem": "^4.2 || ^5.0 || ^6.0", + "symfony/finder": "^4.2 || ^5.0 || ^6.0", + "symfony/options-resolver": "^4.2 || ^5.0 || ^6.0", + "symfony/process": "^4.2 || ^5.0 || ^6.0", + "webmozart/glob": "^4.6" + }, + "require-dev": { + "dantleech/invoke": "^2.0", + "friendsofphp/php-cs-fixer": "^3.0", + "jangregor/phpstan-prophecy": "^1.0", + "phpspec/prophecy": "^1.12", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^8.5.8 || ^9.0", + "symfony/error-handler": "^5.2 || ^6.0", + "symfony/var-dumper": "^4.0 || ^5.0 || ^6.0" + }, + "suggest": { + "ext-xdebug": "For Xdebug profiling extension." + }, + "bin": [ + "bin/phpbench" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "files": [ + "lib/Report/Func/functions.php" + ], + "psr-4": { + "PhpBench\\": "lib/", + "PhpBench\\Extensions\\XDebug\\": "extensions/xdebug/lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Leech", + "email": "daniel@dantleech.com" + } + ], + "description": "PHP Benchmarking Framework", + "support": { + "issues": "https://github.com/phpbench/phpbench/issues", + "source": "https://github.com/phpbench/phpbench/tree/1.2.7" + }, + "funding": [ + { + "url": "https://github.com/dantleech", + "type": "github" + } + ], + "time": "2022-10-15T09:57:51+00:00" + }, { "name": "phpdocumentor/reflection-common", "version": "2.2.0", @@ -3897,16 +3618,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.19", + "version": "9.2.21", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "c77b56b63e3d2031bd8997fcec43c1925ae46559" + "reference": "3f893e19712bb0c8bc86665d1562e9fd509c4ef0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c77b56b63e3d2031bd8997fcec43c1925ae46559", - "reference": "c77b56b63e3d2031bd8997fcec43c1925ae46559", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/3f893e19712bb0c8bc86665d1562e9fd509c4ef0", + "reference": "3f893e19712bb0c8bc86665d1562e9fd509c4ef0", "shasum": "" }, "require": { @@ -3962,7 +3683,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.19" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.21" }, "funding": [ { @@ -3970,7 +3691,7 @@ "type": "github" } ], - "time": "2022-11-18T07:47:47+00:00" + "time": "2022-12-14T13:26:54+00:00" }, { "name": "phpunit/php-file-iterator", @@ -4316,6 +4037,108 @@ ], "time": "2022-04-01T12:37:26+00:00" }, + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, { "name": "sebastian/cli-parser", "version": "1.0.1", @@ -5280,6 +5103,70 @@ ], "time": "2020-09-28T06:39:44+00:00" }, + { + "name": "seld/jsonlint", + "version": "1.9.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "4211420d25eba80712bff236a98960ef68b866b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/4211420d25eba80712bff236a98960ef68b866b7", + "reference": "4211420d25eba80712bff236a98960ef68b866b7", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.5", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "support": { + "issues": "https://github.com/Seldaek/jsonlint/issues", + "source": "https://github.com/Seldaek/jsonlint/tree/1.9.0" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", + "type": "tidelift" + } + ], + "time": "2022-04-01T13:37:23+00:00" + }, { "name": "squizlabs/php_codesniffer", "version": "3.7.1", @@ -5378,6 +5265,368 @@ ], "time": "2022-04-18T20:38:04+00:00" }, + { + "name": "symfony/console", + "version": "v5.4.16", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/8e9b9c8dfb33af6057c94e1b44846bee700dc5ef", + "reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.1|^6.0" + }, + "conflict": { + "psr/log": ">=3", + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0" + }, + "require-dev": { + "psr/log": "^1|^2", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/lock": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/var-dumper": "^4.4|^5.0|^6.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.4.16" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-25T14:09:27+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.3-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-25T10:21:52+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.4.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "ac09569844a9109a5966b9438fc29113ce77cf51" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/ac09569844a9109a5966b9438fc29113ce77cf51", + "reference": "ac09569844a9109a5966b9438fc29113ce77cf51", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v5.4.13" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-09-21T19:53:16+00:00" + }, + { + "name": "symfony/finder", + "version": "v5.4.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/7872a66f57caffa2916a584db1aa7f12adc76f8c", + "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v5.4.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-07-29T07:37:50+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v5.4.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/54f14e36aa73cb8f7261d7686691fd4d75ea2690", + "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php73": "~1.0", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v5.4.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-07-20T13:00:38+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "v1.27.0", @@ -5460,6 +5709,171 @@ ], "time": "2022-11-03T14:55:06+00:00" }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, { "name": "symfony/polyfill-mbstring", "version": "v1.27.0", @@ -5543,6 +5957,318 @@ ], "time": "2022-11-03T14:55:06+00:00" }, + { + "name": "symfony/polyfill-php73", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/process", + "version": "v5.4.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/6e75fe6874cbc7e4773d049616ab450eff537bf1", + "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v5.4.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-06-27T16:58:25+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/aac98028c69df04ee77eb69b96b86ee51fbf4b75", + "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^2.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.3-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-25T10:21:52+00:00" + }, + { + "name": "symfony/string", + "version": "v6.2.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "863219fd713fa41cbcd285a79723f94672faff4d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/863219fd713fa41cbcd285a79723f94672faff4d", + "reference": "863219fd713fa41cbcd285a79723f94672faff4d", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.0" + }, + "require-dev": { + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v6.2.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-12-14T16:11:27+00:00" + }, { "name": "textalk/websocket", "version": "1.5.7", @@ -5717,6 +6443,55 @@ } ], "time": "2022-09-28T08:42:51+00:00" + }, + { + "name": "webmozart/glob", + "version": "4.6.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/glob.git", + "reference": "3c17f7dec3d9d0e87b575026011f2e75a56ed655" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/glob/zipball/3c17f7dec3d9d0e87b575026011f2e75a56ed655", + "reference": "3c17f7dec3d9d0e87b575026011f2e75a56ed655", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5", + "symfony/filesystem": "^5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Glob\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A PHP implementation of Ant's glob.", + "support": { + "issues": "https://github.com/webmozarts/glob/issues", + "source": "https://github.com/webmozarts/glob/tree/4.6.0" + }, + "time": "2022-05-24T19:45:58+00:00" } ], "aliases": [ diff --git a/docker-compose.yml b/docker-compose.yml index 557c52ea7..b9c1235d5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -94,6 +94,7 @@ services: - ./src:/usr/src/code/src - ./dev:/usr/local/dev - ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database + - ./vendor/utopia-php/storage:/usr/src/code/vendor/utopia-php/storage depends_on: - mariadb - redis diff --git a/src/Appwrite/Event/Usage.php b/src/Appwrite/Event/Usage.php index 8cec45d84..39bc09fef 100644 --- a/src/Appwrite/Event/Usage.php +++ b/src/Appwrite/Event/Usage.php @@ -39,7 +39,7 @@ class Usage extends Event public function trigger(): string|bool { $client = new Client($this->queue, $this->connection); - + var_dump('triger'); var_dump($this->metrics); return $client->enqueue([ diff --git a/tests/benchmarks/Services/Functions/Base.php b/tests/benchmarks/Services/Functions/Base.php index 813176eba..b74e366d4 100644 --- a/tests/benchmarks/Services/Functions/Base.php +++ b/tests/benchmarks/Services/Functions/Base.php @@ -50,7 +50,7 @@ abstract class Base extends Scope $stderr = ''; Console::execute( - 'cd ' . realpath(__DIR__ . "/../../resources/functions/php") . " && \ + 'cd ' . realpath(__DIR__ . "/../../../resources/functions/php") . " && \ tar --exclude code.tar.gz -czf code.tar.gz .", '', $stdout, @@ -60,7 +60,7 @@ abstract class Base extends Scope public function createDeployment() { - $code = realpath(__DIR__ . '/../../resources/functions/php/code.tar.gz'); + $code = realpath(__DIR__ . '/../../../resources/functions/php/code.tar.gz'); $response = $this->client->call(Client::METHOD_POST, '/functions/' . static::$functionId . '/deployments', [ 'content-type' => 'multipart/form-data', diff --git a/tests/benchmarks/Services/Storage/Base.php b/tests/benchmarks/Services/Storage/Base.php index 64a8ccaec..6496490a6 100644 --- a/tests/benchmarks/Services/Storage/Base.php +++ b/tests/benchmarks/Services/Storage/Base.php @@ -31,7 +31,8 @@ abstract class Base extends Scope Permission::read(Role::user($this->getUser()['$id'])), Permission::write(Role::user($this->getUser()['$id'])), ], - 'file' => new CURLFile(realpath(__DIR__ . '/../../resources/logo.png'), 'image/png', 'logo.png'), + + 'file' => new CURLFile(realpath(__DIR__ . '/../../../resources/logo.png'), 'image/png', 'logo.png'), ]); } @@ -107,7 +108,7 @@ abstract class Base extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ], [ 'fileId' => ID::unique(), - 'file' => new CURLFile(realpath(__DIR__ . '/../../resources/logo.png'), 'image/png', 'logo.png'), + 'file' => new CURLFile(realpath(__DIR__ . '/../../../resources/logo.png'), 'image/png', 'logo.png'), ]); static::$fileId = $response['body']['$id']; diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index ce1d1fa0c..bbf310e4c 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -19,8 +19,8 @@ class UsageTest extends Scope use SideServer; use FunctionsBase; - const WAIT = 5; - const CREATE = 20; + private const WAIT = 5; + private const CREATE = 20; protected string $projectId; diff --git a/tests/e2e/Scopes/Scope.php b/tests/e2e/Scopes/Scope.php index 2a9f20527..1858e41b8 100644 --- a/tests/e2e/Scopes/Scope.php +++ b/tests/e2e/Scopes/Scope.php @@ -21,7 +21,7 @@ abstract class Scope extends TestCase */ protected $endpoint = 'http://localhost/v1'; - protected function setUp(): void + public function setUp(): void { $this->client = new Client(); @@ -30,7 +30,7 @@ abstract class Scope extends TestCase ; } - protected function tearDown(): void + public function tearDown(): void { $this->client = null; } From 7b9a8c01f2241215e61532a4b29b42066f117856 Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 19 Dec 2022 10:30:32 +0200 Subject: [PATCH 30/94] benchmarks --- tests/e2e/General/AbuseTest.php | 2 +- tests/e2e/General/UsageTest.php | 2 +- tests/unit/Usage/StatsTest.php | 120 ++++++++++++++++---------------- 3 files changed, 62 insertions(+), 62 deletions(-) diff --git a/tests/e2e/General/AbuseTest.php b/tests/e2e/General/AbuseTest.php index 90a4b3380..0db8ce04d 100644 --- a/tests/e2e/General/AbuseTest.php +++ b/tests/e2e/General/AbuseTest.php @@ -17,7 +17,7 @@ class AbuseTest extends Scope use ProjectCustom; use SideNone; - protected function setUp(): void + public function setUp(): void { parent::setUp(); diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index bbf310e4c..8c8fbd964 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -24,7 +24,7 @@ class UsageTest extends Scope protected string $projectId; - protected function setUp(): void + public function setUp(): void { parent::setUp(); } diff --git a/tests/unit/Usage/StatsTest.php b/tests/unit/Usage/StatsTest.php index f02184139..c00ad621e 100644 --- a/tests/unit/Usage/StatsTest.php +++ b/tests/unit/Usage/StatsTest.php @@ -8,64 +8,64 @@ use Utopia\App; class StatsTest extends TestCase { - /** - * @var Stats - */ - protected $object = null; - - public function setUp(): void - { - $host = App::getEnv('_APP_STATSD_HOST', 'telegraf'); - $port = App::getEnv('_APP_STATSD_PORT', 8125); - - $connection = new \Domnikl\Statsd\Connection\UdpSocket($host, $port); - $statsd = new \Domnikl\Statsd\Client($connection); - - $this->object = new Stats($statsd); - } - - public function tearDown(): void - { - } - - public function testNamespace(): void - { - $this->object->setNamespace('appwritetest.usage'); - $this->assertEquals('appwritetest.usage', $this->object->getNamespace()); - } - - public function testParams(): void - { - $this->object - ->setParam('projectId', 'appwrite_test') - ->setParam('projectInternalId', 1) - ->setParam('networkRequestSize', 100) - ; - - $this->assertEquals('appwrite_test', $this->object->getParam('projectId')); - $this->assertEquals(1, $this->object->getParam('projectInternalId')); - $this->assertEquals(100, $this->object->getParam('networkRequestSize')); - - $this->object->submit(); - - $this->assertEquals(null, $this->object->getParam('projectId')); - $this->assertEquals(null, $this->object->getParam('networkRequestSize')); - } - - public function testReset(): void - { - $this->object - ->setParam('projectId', 'appwrite_test') - ->setParam('networkRequestSize', 100) - ; - - $this->assertEquals('appwrite_test', $this->object->getParam('projectId')); - $this->assertEquals(100, $this->object->getParam('networkRequestSize')); - - $this->object->reset(); - - $this->assertEquals(null, $this->object->getParam('projectId')); - $this->assertEquals(null, $this->object->getParam('networkRequestSize')); - $this->assertEquals('appwrite.usage', $this->object->getNamespace()); - } +// /** +// * @var Stats +// */ +// protected $object = null; +// +// public function setUp(): void +// { +// $host = App::getEnv('_APP_STATSD_HOST', 'telegraf'); +// $port = App::getEnv('_APP_STATSD_PORT', 8125); +// +// $connection = new \Domnikl\Statsd\Connection\UdpSocket($host, $port); +// $statsd = new \Domnikl\Statsd\Client($connection); +// +// $this->object = new Stats($statsd); +// } +// +// public function tearDown(): void +// { +// } +// +// public function testNamespace(): void +// { +// $this->object->setNamespace('appwritetest.usage'); +// $this->assertEquals('appwritetest.usage', $this->object->getNamespace()); +// } +// +// public function testParams(): void +// { +// $this->object +// ->setParam('projectId', 'appwrite_test') +// ->setParam('projectInternalId', 1) +// ->setParam('networkRequestSize', 100) +// ; +// +// $this->assertEquals('appwrite_test', $this->object->getParam('projectId')); +// $this->assertEquals(1, $this->object->getParam('projectInternalId')); +// $this->assertEquals(100, $this->object->getParam('networkRequestSize')); +// +// $this->object->submit(); +// +// $this->assertEquals(null, $this->object->getParam('projectId')); +// $this->assertEquals(null, $this->object->getParam('networkRequestSize')); +// } +// +// public function testReset(): void +// { +// $this->object +// ->setParam('projectId', 'appwrite_test') +// ->setParam('networkRequestSize', 100) +// ; +// +// $this->assertEquals('appwrite_test', $this->object->getParam('projectId')); +// $this->assertEquals(100, $this->object->getParam('networkRequestSize')); +// +// $this->object->reset(); +// +// $this->assertEquals(null, $this->object->getParam('projectId')); +// $this->assertEquals(null, $this->object->getParam('networkRequestSize')); +// $this->assertEquals('appwrite.usage', $this->object->getNamespace()); +// } } From c7b259dc0d094b04b06e409d7e1633df4a45433b Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 21 Dec 2022 09:42:03 +0200 Subject: [PATCH 31/94] edge group exclude from general.php --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index 57ba2a114..16154982a 100644 --- a/composer.lock +++ b/composer.lock @@ -2577,16 +2577,16 @@ }, { "name": "doctrine/annotations", - "version": "1.14.1", + "version": "1.14.2", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "9e034d7a70032d422169f27d8759e8d84abb4f51" + "reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/9e034d7a70032d422169f27d8759e8d84abb4f51", - "reference": "9e034d7a70032d422169f27d8759e8d84abb4f51", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/ad785217c1e9555a7d6c6c8c9f406395a5e2882b", + "reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b", "shasum": "" }, "require": { @@ -2647,9 +2647,9 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.14.1" + "source": "https://github.com/doctrine/annotations/tree/1.14.2" }, - "time": "2022-12-12T12:46:12+00:00" + "time": "2022-12-15T06:48:22+00:00" }, { "name": "doctrine/deprecations", @@ -3618,16 +3618,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.21", + "version": "9.2.22", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "3f893e19712bb0c8bc86665d1562e9fd509c4ef0" + "reference": "e4bf60d2220b4baaa0572986b5d69870226b06df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/3f893e19712bb0c8bc86665d1562e9fd509c4ef0", - "reference": "3f893e19712bb0c8bc86665d1562e9fd509c4ef0", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/e4bf60d2220b4baaa0572986b5d69870226b06df", + "reference": "e4bf60d2220b4baaa0572986b5d69870226b06df", "shasum": "" }, "require": { @@ -3683,7 +3683,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.21" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.22" }, "funding": [ { @@ -3691,7 +3691,7 @@ "type": "github" } ], - "time": "2022-12-14T13:26:54+00:00" + "time": "2022-12-18T16:40:55+00:00" }, { "name": "phpunit/php-file-iterator", From c02ef7b340602851374c8388b9ba7136ef3997f2 Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 21 Dec 2022 11:22:29 +0200 Subject: [PATCH 32/94] adding build.storage usage --- app/controllers/api/functions.php | 16 ++++++++++------ app/workers/builds.php | 6 ++++-- docker-compose.yml | 17 +++++++++++++---- .../Utopia/Response/Model/UsageFunction.php | 7 +++++++ .../Utopia/Response/Model/UsageFunctions.php | 7 +++++++ tests/e2e/General/UsageTest.php | 7 +++---- 6 files changed, 44 insertions(+), 16 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 751480a6e..88f7bed08 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1385,6 +1385,7 @@ App::get('/v1/functions/:functionId/usage') 'functions.' . $function->getId() . '.deployments', 'functions.' . $function->getId() . '.deployments.storage', $function->getId() . '.builds', + $function->getId() . '.builds.storage', $function->getId() . '.builds.compute', $function->getId() . '.executions', $function->getId() . '.executions.compute', @@ -1432,9 +1433,10 @@ App::get('/v1/functions/:functionId/usage') 'deployments' => $usage[$metrics[0]], 'deploymentsStorage' => $usage[$metrics[1]], 'builds' => $usage[$metrics[2]], - 'buildsCompute' => $usage[$metrics[3]], - 'executions' => $usage[$metrics[4]], - 'executionsCompute' => $usage[$metrics[5]], + 'buildsStorage' => $usage[$metrics[3]], + 'buildsCompute' => $usage[$metrics[4]], + 'executions' => $usage[$metrics[5]], + 'executionsCompute' => $usage[$metrics[6]], ]), Response::MODEL_USAGE_FUNCTION); }); @@ -1461,6 +1463,7 @@ App::get('/v1/functions/usage') 'deployments', 'deployments.storage', 'builds', + 'builds.storage', 'builds.compute', 'executions', 'executions.compute', @@ -1508,8 +1511,9 @@ App::get('/v1/functions/usage') 'deployments' => $usage[$metrics[1]], 'deploymentsStorage' => $usage[$metrics[2]], 'builds' => $usage[$metrics[3]], - 'buildsCompute' => $usage[$metrics[4]], - 'executions' => $usage[$metrics[5]], - 'executionsCompute' => $usage[$metrics[6]], + 'buildsStorage' => $usage[$metrics[4]], + 'buildsCompute' => $usage[$metrics[5]], + 'executions' => $usage[$metrics[6]], + 'executionsCompute' => $usage[$metrics[7]], ]), Response::MODEL_USAGE_FUNCTIONS); }); diff --git a/app/workers/builds.php b/app/workers/builds.php index 54e8b581f..e76332678 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -252,9 +252,11 @@ class BuildsV1 extends Worker ->getUsageQueue() ->setProject($project) ->addMetric("builds", 1) // per project - ->addMetric("builds.compute", $build->getAttribute('duration')) // per project + ->addMetric("builds.storage", $build->getAttribute('size', 0)) + ->addMetric("builds.compute", $build->getAttribute('duration', 0)) ->addMetric("{$function->getId()}" . ".builds", 1) // per function - ->addMetric("{$function->getId()}" . ".builds.compute", $build->getAttribute('duration')) // per function + ->addMetric("{$function->getId()}" . ".builds.storage", $build->getAttribute('size', 0)) + ->addMetric("{$function->getId()}" . ".builds.compute", $build->getAttribute('duration', 0)) ->trigger() ; } diff --git a/docker-compose.yml b/docker-compose.yml index c6b02784a..095289336 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,6 +33,15 @@ services: - 8080:80 - 443:443 - 9500:8080 + ulimits: + nofile: + soft: 655350 + hard: 655350 + sysctls: + - net.core.somaxconn=1024 + - net.ipv4.tcp_rmem=1024 4096 16384 + - net.ipv4.tcp_wmem=1024 4096 16384 + - net.ipv4.ip_local_port_range=1025 65535 volumes: - /var/run/docker.sock:/var/run/docker.sock - appwrite-config:/storage/config:ro @@ -53,7 +62,6 @@ services: DEBUG: false TESTING: true VERSION: dev - VITE_CONSOLE_MODE: self-hosted ports: - 9501:80 networks: @@ -655,7 +663,7 @@ services: image: openruntimes/executor:0.2.0 networks: - appwrite - - runtimes + - openruntimes-runtimes volumes: - /var/run/docker.sock:/var/run/docker.sock - appwrite-builds:/storage/builds:rw @@ -811,8 +819,8 @@ networks: name: gateway appwrite: name: appwrite - runtimes: - name: runtimes + openruntimes-runtimes: + name: openruntimes-runtimes volumes: appwrite-mariadb: @@ -825,3 +833,4 @@ volumes: appwrite-config: + diff --git a/src/Appwrite/Utopia/Response/Model/UsageFunction.php b/src/Appwrite/Utopia/Response/Model/UsageFunction.php index 410db7333..f528a3c0b 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageFunction.php +++ b/src/Appwrite/Utopia/Response/Model/UsageFunction.php @@ -37,6 +37,13 @@ class UsageFunction extends Model 'example' => [], 'array' => true ]) + ->addRule('buildsStorage', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for builds storage.', + 'default' => [], + 'example' => [], + 'array' => true + ]) ->addRule('buildsCompute', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for function build compute.', diff --git a/src/Appwrite/Utopia/Response/Model/UsageFunctions.php b/src/Appwrite/Utopia/Response/Model/UsageFunctions.php index 85ab2111e..585eceb1e 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageFunctions.php +++ b/src/Appwrite/Utopia/Response/Model/UsageFunctions.php @@ -44,6 +44,13 @@ class UsageFunctions extends Model 'example' => [], 'array' => true ]) + ->addRule('buildsStorage', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated stats for builds storage.', + 'default' => [], + 'example' => [], + 'array' => true + ]) ->addRule('buildsCompute', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for function build compute.', diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index 8c8fbd964..f4e9c0c84 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -2,7 +2,6 @@ namespace Tests\E2E\General; -use Appwrite\Tests\Retry; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -693,7 +692,7 @@ class UsageTest extends Scope ); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(7, count($response['body'])); + $this->assertEquals(8, count($response['body'])); $this->assertEquals('30d', $response['body']['range']); $this->assertIsArray($response['body']['deployments']); $this->assertIsArray($response['body']['deploymentsStorage']); @@ -717,7 +716,7 @@ class UsageTest extends Scope ); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(8, count($response['body'])); + $this->assertEquals(9, count($response['body'])); $this->assertEquals($response['body']['range'], '30d'); $this->assertIsArray($response['body']['functions']); $this->assertIsArray($response['body']['deployments']); @@ -737,7 +736,7 @@ class UsageTest extends Scope $this->validateDates($response['buildsCompute']); } - protected function tearDown(): void + public function tearDown(): void { $this->usersCount = 0; $this->requestsCount = 0; From 5e394fed5d0dc556a2b0dc0baa699a9a8ed365df Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 21 Dec 2022 21:03:09 +0200 Subject: [PATCH 33/94] refactor usage worker --- app/config/collections.php | 2 +- app/controllers/api/storage.php | 1 + app/controllers/shared/api.php | 4 +- app/worker.php | 2 +- app/workers/usage.php | 141 +++++++++++++++----------------- src/Appwrite/Event/Usage.php | 2 - tests/e2e/General/UsageTest.php | 6 +- 7 files changed, 75 insertions(+), 83 deletions(-) diff --git a/app/config/collections.php b/app/config/collections.php index a56effa9d..430671a5c 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -3167,7 +3167,7 @@ $collections = [ ], [ '$id' => ID::custom('_key_metric_period_time'), - 'type' => Database::INDEX_KEY, + 'type' => Database::INDEX_UNIQUE, 'attributes' => ['metric', 'period', 'time'], 'lengths' => [], 'orders' => [Database::ORDER_DESC], diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 31b8d9073..279ef4f3a 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -1470,6 +1470,7 @@ App::get('/v1/storage/:bucketId/usage') foreach ($metrics as $metric) { $usage[$metric] = []; $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { $leap += $days['factor']; $formatDate = date($format, $leap); diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 0ffed039c..dbe5371c9 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -76,9 +76,9 @@ $databaseListener = function (string $event, array $args, Document $project, Usa //Project level sessions deduction if ($event === Database::EVENT_DOCUMENT_DELETE) { - $sessions = (count($document->getAttribute('sessions'))); + $sessions = count($document->getAttribute('sessions')); $queueForUsage - ->addMetric("databases", ($sessions['value'] * -1)); // per project + ->addMetric("sessions", ($sessions * -1)); // per project } break; case $document->getCollection() === 'sessions': // sessions diff --git a/app/worker.php b/app/worker.php index 78671d731..c883a95e7 100644 --- a/app/worker.php +++ b/app/worker.php @@ -112,7 +112,7 @@ if (empty(App::getEnv('QUEUE'))) { throw new Exception('Please configure "QUEUE" environemnt variable.'); } -$adapter = new Swoole($connection, $workerNumber, App::getEnv('QUEUE')); +$adapter = new Swoole($connection, 1, App::getEnv('QUEUE')); $server = new Server($adapter); $server diff --git a/app/workers/usage.php b/app/workers/usage.php index b408e9f2c..947583947 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -25,23 +25,18 @@ $periods['inf'] = '0000-00-00 00:00'; $server->job() ->inject('message') ->action(function (Message $message) use (&$stats) { + $payload = $message->getPayload() ?? []; $project = new Document($payload['project'] ?? []); + $projectId = $project->getInternalId(); + $stats[$projectId]['database'] = $project->getAttribute('database'); foreach ($payload['metrics'] ?? [] as $metric) { - $uniq = md5($metric['key']); - - if (!isset($stats[$uniq])) { - $stats[$uniq] = [ - 'projectInternalId' => $project->getInternalId(), - 'database' => $project->getAttribute('database'), - 'key' => $metric['key'], - 'value' => $metric['value'] - ]; - + if (!isset($stats[$projectId]['keys'][$metric['key']])) { + $stats[$projectId]['keys'][$metric['key']] = $metric['value']; continue; } - $stats[$uniq]['value'] += $metric['value']; + $stats[$projectId]['keys'][$metric['key']] += $metric['value']; } }); @@ -51,76 +46,70 @@ $server ->inject('cache') ->inject('pools') ->action(function ($register, $cache, $pools) use ($periods, &$stats) { - Timer::tick(3000, function () use ($register, $cache, $pools, $periods, &$stats) { - $slice = array_slice($stats, 0, count($stats)); - array_splice($stats, 0, count($stats)); - //$log = []; + Timer::tick(30000, function () use ($register, $cache, $pools, $periods, &$stats) { - foreach ($slice as $metric) { - if ($metric['value'] == 0) { - continue; - } - $dbForProject = new Database( - $pools - ->get($metric['database']) - ->pop() - ->getResource(), - $cache - ); + $offset = count($stats); + $projects = array_slice($stats, 0, $offset, true); + array_splice($stats, 0, $offset); - $dbForProject->setNamespace('_' . $metric['projectInternalId']); - foreach ($periods as $period => $format) { - $time = 'inf' === $period ? null : date($format, time()); - $id = \md5("{$time}_{$period}_{$metric['key']}"); - try { - try { - $dbForProject->createDocument('stats', new Document([ - '$id' => $id, - 'period' => $period, - 'time' => $time, - 'metric' => $metric['key'], - 'value' => $metric['value'], - 'region' => App::getEnv('_APP_REGION', 'default'), - ])); - } catch (Duplicate $th) { - if ($metric['value'] < 0) { - $dbForProject->decreaseDocumentAttribute( - 'stats', - $id, - 'value', - abs($metric['value']) - ); - } else { - $dbForProject->increaseDocumentAttribute( - 'stats', - $id, - 'value', - $metric['value'] - ); - } + foreach ($projects as $projectInternalId => $project) { + try { + $dbForProject = new Database( + $pools + ->get($project['database']) + ->pop() + ->getResource(), + $cache + ); + + $dbForProject->setNamespace('_' . $projectInternalId); + + foreach ($project['keys'] as $key => $value) { + if ($value == 0) { + continue; } -// $log[] = [ -// 'id' => $id, -// 'period' => $period, -// 'time' => $time, -// 'metric' => $metric['key'], -// 'value' => $metric['value'], -// 'region' => App::getEnv('_APP_REGION', 'default'), -// ]; - } catch (\Exception $e) { - console::error($e->getMessage()); - } finally { - $pools->reclaim(); - } - } + foreach ($periods as $period => $format) { + $time = 'inf' === $period ? null : date($format, time()); + $id = \md5("{$time}_{$period}_{$key}"); -// if (!empty($log)) { -// $dbForProject->createDocument('statsLogger', new Document([ -// 'time' => DateTime::now(), -// 'metrics' => $log, -// ])); -// } + try { + $dbForProject->createDocument('stats', new Document([ + '$id' => $id, + 'period' => $period, + 'time' => $time, + 'metric' => $key, + 'value' => $value, + 'region' => App::getEnv('_APP_REGION', 'default'), + ])); + } catch (Duplicate $th) { + if ($value < 0) { + $dbForProject->decreaseDocumentAttribute( + 'stats', + $id, + 'value', + abs($value) + ); + } else { + $dbForProject->increaseDocumentAttribute( + 'stats', + $id, + 'value', + $value + ); + } + } + } + } + $dbForProject->createDocument('statsLogger', new Document([ + 'time' => DateTime::now(), + 'metrics' => $project['keys'], + ])); + } catch (\Exception $e) { + console::error($e->getMessage()); + } finally { + $pools->reclaim(); + } } }); }); diff --git a/src/Appwrite/Event/Usage.php b/src/Appwrite/Event/Usage.php index 39bc09fef..00ef7c17f 100644 --- a/src/Appwrite/Event/Usage.php +++ b/src/Appwrite/Event/Usage.php @@ -39,8 +39,6 @@ class Usage extends Event public function trigger(): string|bool { $client = new Client($this->queue, $this->connection); - var_dump('triger'); - var_dump($this->metrics); return $client->enqueue([ 'project' => $this->getProject(), diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index f4e9c0c84..ab9e82e0d 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -18,7 +18,7 @@ class UsageTest extends Scope use SideServer; use FunctionsBase; - private const WAIT = 5; + private const WAIT = 30; private const CREATE = 20; protected string $projectId; @@ -111,7 +111,11 @@ class UsageTest extends Scope $consoleHeaders ); $res = $res['body']; + var_dump($res['users']); + var_dump(array_key_last($res['users'])); + var_dump($res['users'][array_key_last($res['users'])]['value']); + exit; $this->assertEquals('24h', $res['range']); $this->assertEquals(9, count($res)); $this->assertEquals(24, count($res['requests'])); From 18f7b3adbb426a2419c3c9952dd2b1568d1aa33c Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 22 Dec 2022 10:48:03 +0200 Subject: [PATCH 34/94] refactor usage worker --- app/controllers/shared/api.php | 53 ++++++++++++++++++---------------- app/worker.php | 2 +- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index dbe5371c9..af1cb3cf4 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -50,11 +50,9 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar return $label; }; -$databaseListener = function (string $event, array $args, Document $project, Usage $queueForUsage, Database $dbForProject, Logger|null $logger) { +$databaseListener = function (string $event, Document $document, Document $project, Usage $queueForUsage, Database $dbForProject, Logger|null $logger) { $value = 1; - $document = $args['document']; - $collection = $args['collection']; if ($event === Database::EVENT_DOCUMENT_DELETE) { $value = -1; @@ -91,8 +89,8 @@ $databaseListener = function (string $event, array $args, Document $project, Usa if ($event === Database::EVENT_DOCUMENT_DELETE) { //Project level collections/documents deduction - $collections = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".collections")); - $documents = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".documents")); + $collections = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getAttribute('$internalId')}" . ".collections")); + $documents = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getAttribute('$internalId')}" . ".documents")); $queueForUsage ->addMetric("collections", ($collections['value'] * -1)) ->addMetric("documents", ($documents['value'] * -1)) @@ -100,24 +98,29 @@ $databaseListener = function (string $event, array $args, Document $project, Usa } break; case str_starts_with($document->getCollection(), 'database_') && !str_contains($document->getCollection(), 'collection'): //collections + $parts = explode('_', $document->getCollection()); + $databaseId = $parts[1]; $queueForUsage ->addMetric("collections", $value) // per project - ->addMetric("{$document['databaseId']}" . ".collections", $value) // per database + ->addMetric("{$databaseId}" . ".collections", $value) // per database ; if ($event === Database::EVENT_DOCUMENT_DELETE) { //Project documents deduction - $documents = $dbForProject->getDocument('stats', md5("_inf_" . "{$document['databaseId']}" . ".documents")); + $documents = $dbForProject->getDocument('stats', md5("_inf_" . "{$databaseId}" . ".documents")); $queueForUsage ->addMetric("documents", ($documents['value'] * -1)) ; } break; case str_starts_with($document->getCollection(), 'database_') && str_contains($document->getCollection(), '_collection_'): //documents + $parts = explode('_', $document->getCollection()); + $databaseId = $parts[1]; + $collectionId = $parts[3]; $queueForUsage ->addMetric("documents", $value) // per project - ->addMetric("{$document->getAttribute('$databaseId')}" . ".documents", $value) // per database - ->addMetric("{$document->getAttribute('$databaseId')}" . "." . "{$collection->getId()}" . ".documents", $value) // per collection + ->addMetric("{$databaseId}" . ".documents", $value) // per database + ->addMetric("{$databaseId}" . "." . "{$collectionId}" . ".documents", $value) // per collection ; break; case $document->getCollection() === 'buckets': @@ -125,8 +128,8 @@ $databaseListener = function (string $event, array $args, Document $project, Usa ->addMetric("buckets", $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { - $files = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".files")); - $storage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".files.storage")); + $files = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getAttribute('$internalId')}" . ".files")); + $storage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getAttribute('$internalId')}" . ".files.storage")); //Project level function deduction $queueForUsage @@ -139,8 +142,8 @@ $databaseListener = function (string $event, array $args, Document $project, Usa $queueForUsage ->addMetric("files", $value) // per project ->addMetric("files.storage", $document->getAttribute('sizeOriginal') * $value) // per project - ->addMetric("{$document['bucketId']}" . ".files", $value) // per bucket - ->addMetric("{$document['bucketId']}" . ".files.storage", $document->getAttribute('sizeOriginal') * $value)// per bucket + ->addMetric("{$document->getAttribute('bucketId')}" . ".files", $value) // per bucket + ->addMetric("{$document->getAttribute('bucketId')}" . ".files.storage", $document->getAttribute('sizeOriginal') * $value)// per bucket ; break; case $document->getCollection() === 'functions': @@ -149,13 +152,13 @@ $databaseListener = function (string $event, array $args, Document $project, Usa if ($event === Database::EVENT_DOCUMENT_DELETE) { //Project level function deduction - $deployments = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getId()}" . ".deployments")); - $deploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getId()}" . ".deployments.storage")); - $builds = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".builds")); - $buildsStorage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".builds.storage")); - $buildsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".builds.compute")); - $executions = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".executions")); - $executionsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getId()}" . ".executions.compute")); + $deployments = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getAttribute('$internalId')}" . ".deployments")); + $deploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getAttribute('$internalId')}" . ".deployments.storage")); + $builds = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getAttribute('$internalId')}" . ".builds")); + $buildsStorage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getAttribute('$internalId')}" . ".builds.storage")); + $buildsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getAttribute('$internalId')}" . ".builds.compute")); + $executions = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getAttribute('$internalId')}" . ".executions")); + $executionsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getAttribute('$internalId')}" . ".executions.compute")); $queueForUsage ->addMetric("deployments", ($deployments['value'] * -1)) @@ -172,14 +175,14 @@ $databaseListener = function (string $event, array $args, Document $project, Usa $queueForUsage ->addMetric("deployments", $value) // per project ->addMetric("deployments.storage", $document->getAttribute('size') * $value) // per project - ->addMetric("{$document['resourceType']}" . "." . "{$document['resourceId']}" . ".deployments", $value)// per function - ->addMetric("{$document['resourceType']}" . "." . "{$document['resourceId']}" . ".deployments.storage", $document->getAttribute('size') * $value) // per function + ->addMetric("{$document->getAttribute('resourceType')}" . "." . "{$document->getAttribute('resourceId')}" . ".deployments", $value)// per function + ->addMetric("{$document->getAttribute('resourceType')}" . "." . "{$document->getAttribute('resourceId')}" . ".deployments.storage", $document->getAttribute('size') * $value) // per function ; break; case $document->getCollection() === 'executions': $queueForUsage ->addMetric("executions", $value) // per project - ->addMetric("{$document['functionId']}" . ".executions", $value) // per function + ->addMetric("{$document->getAttribute('functionId')}" . ".executions", $value) // per function ; break; default: @@ -317,8 +320,8 @@ App::init() $database->setProject($project); $dbForProject - ->on(Database::EVENT_DOCUMENT_CREATE, fn ($event, $args) => $databaseListener($event, $args, $project, $queueForUsage, $dbForProject, $logger)) - ->on(Database::EVENT_DOCUMENT_DELETE, fn ($event, $args) => $databaseListener($event, $args, $project, $queueForUsage, $dbForProject, $logger)) + ->on(Database::EVENT_DOCUMENT_CREATE, fn ($event, $document) => $databaseListener($event, $document, $project, $queueForUsage, $dbForProject, $logger)) + ->on(Database::EVENT_DOCUMENT_DELETE, fn ($event, $document) => $databaseListener($event, $document, $project, $queueForUsage, $dbForProject, $logger)) ; $useCache = $route->getLabel('cache', false); diff --git a/app/worker.php b/app/worker.php index c883a95e7..78671d731 100644 --- a/app/worker.php +++ b/app/worker.php @@ -112,7 +112,7 @@ if (empty(App::getEnv('QUEUE'))) { throw new Exception('Please configure "QUEUE" environemnt variable.'); } -$adapter = new Swoole($connection, 1, App::getEnv('QUEUE')); +$adapter = new Swoole($connection, $workerNumber, App::getEnv('QUEUE')); $server = new Server($adapter); $server From 20f9b0c655df348e7a9146c819e7cc448f19fbe6 Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 22 Dec 2022 15:02:41 +0200 Subject: [PATCH 35/94] refactor usage worker --- app/controllers/api/databases.php | 6 +- app/controllers/api/functions.php | 10 ++-- app/controllers/api/storage.php | 4 +- app/controllers/shared/api.php | 95 ++++++++++++++++++------------- tests/e2e/General/UsageTest.php | 24 ++++---- 5 files changed, 78 insertions(+), 61 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 583be90f1..d9312442a 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -2411,8 +2411,8 @@ App::get('/v1/databases/:databaseId/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - $database->getId() . '.collections', - $database->getId() . '.documents', + $database->getInternalId() . '.collections', + $database->getInternalId() . '.documents', ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { @@ -2490,7 +2490,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - $collection->getId() . '.documents', + $collectionDocument->getInternalId() . '.documents', ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 88f7bed08..c04840493 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1384,11 +1384,11 @@ App::get('/v1/functions/:functionId/usage') $metrics = [ 'functions.' . $function->getId() . '.deployments', 'functions.' . $function->getId() . '.deployments.storage', - $function->getId() . '.builds', - $function->getId() . '.builds.storage', - $function->getId() . '.builds.compute', - $function->getId() . '.executions', - $function->getId() . '.executions.compute', + $function->getInternalId() . '.builds', + $function->getInternalId() . '.builds.storage', + $function->getInternalId() . '.builds.compute', + $function->getInternalId() . '.executions', + $function->getInternalId() . '.executions.compute', ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 279ef4f3a..dcf5900b4 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -1439,8 +1439,8 @@ App::get('/v1/storage/:bucketId/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - $bucket->getId() . '.files', - $bucket->getId() . '.files.storage', + $bucket->getInternalId() . '.files', + $bucket->getInternalId() . '.files.storage', ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index af1cb3cf4..d126ac926 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -75,8 +75,10 @@ $databaseListener = function (string $event, Document $document, Document $proje //Project level sessions deduction if ($event === Database::EVENT_DOCUMENT_DELETE) { $sessions = count($document->getAttribute('sessions')); - $queueForUsage - ->addMetric("sessions", ($sessions * -1)); // per project + if (!empty($sessions)) { + $queueForUsage + ->addMetric("sessions", ($sessions * -1)); // per project + } } break; case $document->getCollection() === 'sessions': // sessions @@ -89,12 +91,13 @@ $databaseListener = function (string $event, Document $document, Document $proje if ($event === Database::EVENT_DOCUMENT_DELETE) { //Project level collections/documents deduction - $collections = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getAttribute('$internalId')}" . ".collections")); - $documents = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getAttribute('$internalId')}" . ".documents")); - $queueForUsage - ->addMetric("collections", ($collections['value'] * -1)) - ->addMetric("documents", ($documents['value'] * -1)) - ; + $collections = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".collections")); + $documents = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".documents")); + if (!empty($collections['value'])) { + $queueForUsage + ->addMetric("collections", ($collections['value'] * -1)) + ->addMetric("documents", ($documents['value'] * -1)); + } } break; case str_starts_with($document->getCollection(), 'database_') && !str_contains($document->getCollection(), 'collection'): //collections @@ -108,9 +111,10 @@ $databaseListener = function (string $event, Document $document, Document $proje if ($event === Database::EVENT_DOCUMENT_DELETE) { //Project documents deduction $documents = $dbForProject->getDocument('stats', md5("_inf_" . "{$databaseId}" . ".documents")); - $queueForUsage - ->addMetric("documents", ($documents['value'] * -1)) - ; + if (!empty($documents['value'])) { + $queueForUsage + ->addMetric("documents", ($documents['value'] * -1)); + } } break; case str_starts_with($document->getCollection(), 'database_') && str_contains($document->getCollection(), '_collection_'): //documents @@ -128,22 +132,25 @@ $databaseListener = function (string $event, Document $document, Document $proje ->addMetric("buckets", $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { - $files = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getAttribute('$internalId')}" . ".files")); - $storage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getAttribute('$internalId')}" . ".files.storage")); + //Project files/files.storage deduction + $files = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".files")); + $storage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".files.storage")); - //Project level function deduction - $queueForUsage - ->addMetric("files", ($files['value'] * -1)) - ->addMetric("files.storage", ($storage['value'] * -1)) - ; + if (!empty($files['value'])) { + $queueForUsage + ->addMetric("files", ($files['value'] * -1)) + ->addMetric("files.storage", ($storage['value'] * -1)); + } } break; case str_starts_with($document->getCollection(), 'bucket_'): // files + $parts = explode('_', $document->getCollection()); + $bucketId = $parts[1]; $queueForUsage ->addMetric("files", $value) // per project ->addMetric("files.storage", $document->getAttribute('sizeOriginal') * $value) // per project - ->addMetric("{$document->getAttribute('bucketId')}" . ".files", $value) // per bucket - ->addMetric("{$document->getAttribute('bucketId')}" . ".files.storage", $document->getAttribute('sizeOriginal') * $value)// per bucket + ->addMetric("{$bucketId}" . ".files", $value) // per bucket + ->addMetric("{$bucketId}" . ".files.storage", $document->getAttribute('sizeOriginal') * $value)// per bucket ; break; case $document->getCollection() === 'functions': @@ -151,24 +158,36 @@ $databaseListener = function (string $event, Document $document, Document $proje ->addMetric("functions", $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { - //Project level function deduction - $deployments = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getAttribute('$internalId')}" . ".deployments")); - $deploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getAttribute('$internalId')}" . ".deployments.storage")); - $builds = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getAttribute('$internalId')}" . ".builds")); - $buildsStorage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getAttribute('$internalId')}" . ".builds.storage")); - $buildsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getAttribute('$internalId')}" . ".builds.compute")); - $executions = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getAttribute('$internalId')}" . ".executions")); - $executionsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getAttribute('$internalId')}" . ".executions.compute")); + //Project level function/builds/executions deduction + $deployments = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getInternalId()}" . ".deployments")); + $deploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getInternalId()}" . ".deployments.storage")); + $builds = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".builds")); + $buildsStorage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".builds.storage")); + $buildsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".builds.compute")); + $executions = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".executions")); + $executionsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".executions.compute")); - $queueForUsage - ->addMetric("deployments", ($deployments['value'] * -1)) - ->addMetric("deployments.storage", ($deploymentsStorage['value'] * -1)) - ->addMetric("builds", ($builds['value'] * -1)) - ->addMetric("builds.storage", ($buildsStorage['value'] * -1)) - ->addMetric("builds.compute", ($buildsCompute['value'] * -1)) - ->addMetric("executions", ($executions['value'] * -1)) - ->addMetric("executions.compute", ($executionsCompute['value'] * -1)) - ; + if (!empty($deployments['value'])) { + $queueForUsage + ->addMetric("deployments", ($deployments['value'] * -1)) + ->addMetric("deployments.storage", ($deploymentsStorage['value'] * -1)) + ; + } + + if (!empty($builds['value'])) { + $queueForUsage + ->addMetric("builds", ($builds['value'] * -1)) + ->addMetric("builds.storage", ($buildsStorage['value'] * -1)) + ->addMetric("builds.compute", ($buildsCompute['value'] * -1)) + ; + } + + if (!empty($executions['value'])) { + $queueForUsage + ->addMetric("executions", ($executions['value'] * -1)) + ->addMetric("executions.compute", ($executionsCompute['value'] * -1)) + ; + } } break; case $document->getCollection() === 'deployments': @@ -556,7 +575,7 @@ App::shutdown() if ( $project->getId() !== 'console' - //&& $mode !== APP_MODE_ADMIN + && $mode !== APP_MODE_ADMIN ) { $fileSize = 0; $file = $request->getFiles('file'); diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index ab9e82e0d..abaac548c 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -111,11 +111,7 @@ class UsageTest extends Scope $consoleHeaders ); $res = $res['body']; - var_dump($res['users']); - var_dump(array_key_last($res['users'])); - var_dump($res['users'][array_key_last($res['users'])]['value']); - exit; $this->assertEquals('24h', $res['range']); $this->assertEquals(9, count($res)); $this->assertEquals(24, count($res['requests'])); @@ -162,7 +158,9 @@ class UsageTest extends Scope '/storage/buckets', array_merge( $headers, - ['content-type' => 'multipart/form-data'] + [ + 'content-type' => 'multipart/form-data' + ] ), [ 'bucketId' => 'unique()', @@ -517,14 +515,14 @@ class UsageTest extends Scope $this->assertEquals($collectionsCount, $res['collectionsCount'][array_key_last($res['collectionsCount'])]['value']); $this->validateDates($res['collectionsCount']); -// $this->assertEquals($documentsCount, $res['documentsCount'][array_key_last($res['documentsCount'])]['value']); -// $this->validateDates($res['documentsCount']); -// -// $res = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/usage?range=30d', $data['consoleHeaders']); -// $res = $res['body']; -// -// $this->assertEquals($documentsCount, $res['documentsCount'][array_key_last($res['documentsCount'])]['value']); -// $this->validateDates($res['documentsCount']); + $this->assertEquals($documentsCount, $res['documentsCount'][array_key_last($res['documentsCount'])]['value']); + $this->validateDates($res['documentsCount']); + + $res = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/usage?range=30d', $data['consoleHeaders']); + $res = $res['body']; + + $this->assertEquals($documentsCount, $res['documentsCount'][array_key_last($res['documentsCount'])]['value']); + $this->validateDates($res['documentsCount']); $data['requestsCount'] = $requestsCount; From b89e04f5611c93c020454da7ee33503f9a87f192 Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 22 Dec 2022 19:18:54 +0200 Subject: [PATCH 36/94] add internalId to collections --- app/config/collections.php | 57 +++++++++++++++++++++++++++++-- app/controllers/api/functions.php | 4 +++ app/controllers/shared/api.php | 6 ++-- app/workers/builds.php | 10 +++--- app/workers/functions.php | 2 +- 5 files changed, 69 insertions(+), 10 deletions(-) diff --git a/app/config/collections.php b/app/config/collections.php index 430671a5c..96ad8bf92 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -61,7 +61,6 @@ $collections = [ ], ], ], - 'collections' => [ '$collection' => ID::custom('databases'), '$id' => ID::custom('collections'), @@ -2371,6 +2370,17 @@ $collections = [ '$id' => ID::custom('deployments'), 'name' => 'Deployments', 'attributes' => [ + [ + '$id' => ID::custom('resourceInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], [ '$id' => ID::custom('resourceId'), 'type' => Database::VAR_STRING, @@ -2393,6 +2403,17 @@ $collections = [ 'array' => false, 'filters' => [], ], + [ + '$id' => ID::custom('buildInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], [ '$id' => ID::custom('buildId'), 'type' => Database::VAR_STRING, @@ -2573,6 +2594,17 @@ $collections = [ 'array' => false, 'filters' => [], ], + [ + '$id' => 'deploymentInternalId', + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], [ '$id' => ID::custom('deploymentId'), 'type' => Database::VAR_STRING, @@ -2689,6 +2721,17 @@ $collections = [ '$id' => ID::custom('executions'), 'name' => 'Executions', 'attributes' => [ + [ + '$id' => ID::custom('functionInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], [ '$id' => ID::custom('functionId'), 'type' => Database::VAR_STRING, @@ -2700,6 +2743,17 @@ $collections = [ 'array' => false, 'filters' => [], ], + [ + '$id' => ID::custom('deploymentInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], [ '$id' => ID::custom('deploymentId'), 'type' => Database::VAR_STRING, @@ -3318,7 +3372,6 @@ $collections = [ ], ], ], - 'files' => [ '$collection' => ID::custom('buckets'), '$id' => ID::custom('files'), diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index c04840493..baff261f8 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -526,6 +526,7 @@ App::post('/v1/functions/:functionId/deployments') Permission::update(Role::any()), Permission::delete(Role::any()), ], + 'resourceInternalId' => $function->getInternalId(), 'resourceId' => $function->getId(), 'resourceType' => 'functions', 'entrypoint' => $entrypoint, @@ -556,6 +557,7 @@ App::post('/v1/functions/:functionId/deployments') Permission::update(Role::any()), Permission::delete(Role::any()), ], + 'resourceInternalId' => $function->getInternalId(), 'resourceId' => $function->getId(), 'resourceType' => 'functions', 'entrypoint' => $entrypoint, @@ -902,7 +904,9 @@ App::post('/v1/functions/:functionId/executions') $execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', new Document([ '$id' => $executionId, '$permissions' => !$user->isEmpty() ? [Permission::read(Role::user($user->getId()))] : [], + 'functionInternalId' => $function->getInternalId(), 'functionId' => $function->getId(), + 'deploymentInternalId' => $deployment->getInternalId(), 'deploymentId' => $deployment->getId(), 'trigger' => 'http', // http / schedule / event 'status' => $async ? 'waiting' : 'processing', // waiting / processing / completed / failed diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index d126ac926..bfcf6f1a2 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -194,14 +194,14 @@ $databaseListener = function (string $event, Document $document, Document $proje $queueForUsage ->addMetric("deployments", $value) // per project ->addMetric("deployments.storage", $document->getAttribute('size') * $value) // per project - ->addMetric("{$document->getAttribute('resourceType')}" . "." . "{$document->getAttribute('resourceId')}" . ".deployments", $value)// per function - ->addMetric("{$document->getAttribute('resourceType')}" . "." . "{$document->getAttribute('resourceId')}" . ".deployments.storage", $document->getAttribute('size') * $value) // per function + ->addMetric("{$document->getAttribute('resourceType')}" . "." . "{$document->getAttribute('resourceInternalId')}" . ".deployments", $value)// per function + ->addMetric("{$document->getAttribute('resourceType')}" . "." . "{$document->getAttribute('resourceInternalId')}" . ".deployments.storage", $document->getAttribute('size') * $value) // per function ; break; case $document->getCollection() === 'executions': $queueForUsage ->addMetric("executions", $value) // per project - ->addMetric("{$document->getAttribute('functionId')}" . ".executions", $value) // per function + ->addMetric("{$document->getAttribute('functionInternalId')}" . ".executions", $value) // per function ; break; default: diff --git a/app/workers/builds.php b/app/workers/builds.php index e76332678..523ef4267 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -96,6 +96,7 @@ class BuildsV1 extends Worker '$id' => $buildId, '$permissions' => [], 'startTime' => $startTime, + 'deploymentInternalId' => $deployment->getInternalId(), 'deploymentId' => $deployment->getId(), 'status' => 'processing', 'path' => '', @@ -107,7 +108,8 @@ class BuildsV1 extends Worker 'stderr' => '', 'duration' => 0 ])); - $deployment->setAttribute('buildId', $buildId); + $deployment->setAttribute('buildId', $build->getId()); + $deployment->setAttribute('buildInternalId', $build->getInternalId()); $deployment = $dbForProject->updateDocument('deployments', $deployment->getId(), $deployment); } else { $build = $dbForProject->getDocument('builds', $buildId); @@ -254,9 +256,9 @@ class BuildsV1 extends Worker ->addMetric("builds", 1) // per project ->addMetric("builds.storage", $build->getAttribute('size', 0)) ->addMetric("builds.compute", $build->getAttribute('duration', 0)) - ->addMetric("{$function->getId()}" . ".builds", 1) // per function - ->addMetric("{$function->getId()}" . ".builds.storage", $build->getAttribute('size', 0)) - ->addMetric("{$function->getId()}" . ".builds.compute", $build->getAttribute('duration', 0)) + ->addMetric("{$function->getInternalId()}" . ".builds", 1) // per function + ->addMetric("{$function->getInternalId()}" . ".builds.storage", $build->getAttribute('size', 0)) + ->addMetric("{$function->getInternalId()}" . ".builds.compute", $build->getAttribute('duration', 0)) ->trigger() ; } diff --git a/app/workers/functions.php b/app/workers/functions.php index 63e1b5582..aa869ec3c 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -215,7 +215,7 @@ Server::setResource('execute', function () { $queueForUsage ->setProject($project) ->addMetric('executions.compute', (int)($execution->getAttribute('duration') * 1000))// per project - ->addMetric("{$function->getId()}" . ".executions.compute", (int)($execution->getAttribute('duration') * 1000))// per function + ->addMetric("{$function->getInternalId()}" . ".executions.compute", (int)($execution->getAttribute('duration') * 1000))// per function ->trigger() ; }; From a8fe99def026c2fde1fbd00482775538547c966a Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 25 Dec 2022 12:17:49 +0200 Subject: [PATCH 37/94] add internalId to collections --- app/controllers/api/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index baff261f8..d4d3def14 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1386,8 +1386,8 @@ App::get('/v1/functions/:functionId/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - 'functions.' . $function->getId() . '.deployments', - 'functions.' . $function->getId() . '.deployments.storage', + 'functions.' . $function->getInternalId() . '.deployments', + 'functions.' . $function->getInternalId() . '.deployments.storage', $function->getInternalId() . '.builds', $function->getInternalId() . '.builds.storage', $function->getInternalId() . '.builds.compute', From 0ac5e293b6cc6dd666b4f2266f0d1f2ac0d6467a Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 25 Dec 2022 14:13:52 +0200 Subject: [PATCH 38/94] add internalId to collections --- app/config/collections.php | 33 +++++++++++++++++++++++++++++++ app/controllers/api/functions.php | 4 ++++ app/workers/builds.php | 1 + 3 files changed, 38 insertions(+) diff --git a/app/config/collections.php b/app/config/collections.php index 96ad8bf92..2ba8c6717 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -785,6 +785,17 @@ $collections = [ 'array' => false, 'filters' => [], ], + [ + '$id' => ID::custom('resourceInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], [ '$id' => ID::custom('resourceId'), 'type' => Database::VAR_STRING, @@ -2223,6 +2234,17 @@ $collections = [ 'array' => false, 'filters' => [], ], + [ + '$id' => ID::custom('deploymentInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], [ '$id' => ID::custom('deployment'), 'type' => Database::VAR_STRING, @@ -2256,6 +2278,17 @@ $collections = [ 'array' => true, 'filters' => [], ], + [ + '$id' => ID::custom('scheduleInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], [ '$id' => ID::custom('scheduleId'), 'type' => Database::VAR_STRING, diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index d4d3def14..0def10bb5 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -81,6 +81,7 @@ App::post('/v1/functions') 'enabled' => $enabled, 'name' => $name, 'runtime' => $runtime, + 'deploymentInternalId' => '', 'deployment' => '', 'events' => $events, 'schedule' => $schedule, @@ -102,6 +103,7 @@ App::post('/v1/functions') ); $function->setAttribute('scheduleId', $schedule->getId()); + $function->setAttribute('scheduleInternalId', $schedule->getInternalId()); $dbForProject->updateDocument('functions', $function->getId(), $function); $eventsInstance->setParam('functionId', $function->getId()); @@ -321,6 +323,7 @@ App::patch('/v1/functions/:functionId/deployments/:deploymentId') } $function = $dbForProject->updateDocument('functions', $function->getId(), new Document(array_merge($function->getArrayCopy(), [ + 'deploymentInternalId' => $deployment->getInternalId(), 'deployment' => $deployment->getId() ]))); @@ -755,6 +758,7 @@ App::delete('/v1/functions/:functionId/deployments/:deploymentId') if ($function->getAttribute('deployment') === $deployment->getId()) { // Reset function deployment $function = $dbForProject->updateDocument('functions', $function->getId(), new Document(array_merge($function->getArrayCopy(), [ 'deployment' => '', + 'deploymentInternalId' => '', ]))); } diff --git a/app/workers/builds.php b/app/workers/builds.php index 523ef4267..36d9d96bc 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -205,6 +205,7 @@ class BuildsV1 extends Worker /** Set auto deploy */ if ($deployment->getAttribute('activate') === true) { + $function->setAttribute('deploymentInternalId', $deployment->getInternalId()); $function->setAttribute('deployment', $deployment->getId()); $function = $dbForProject->updateDocument('functions', $function->getId(), $function); } From e533f8f06744293a01a6ee4c7d5d0e03749d75a7 Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 25 Dec 2022 19:07:03 +0200 Subject: [PATCH 39/94] minor adjustments --- app/controllers/api/functions.php | 2 +- app/controllers/shared/api.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 0def10bb5..88fe535b2 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1007,7 +1007,7 @@ App::post('/v1/functions/:functionId/executions') */ $queueForUsage ->addMetric('executions.compute', (int)($executionResponse['duration'] * 1000))// per project - ->addMetric("{$function->getId()}" . ".executions.compute", (int)($executionResponse['duration'] * 1000))// per function + ->addMetric("{$function->getInternalId()}" . ".executions.compute", (int)($executionResponse['duration'] * 1000))// per function ; } catch (\Throwable $th) { diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index bfcf6f1a2..4fc5b6aa6 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -74,7 +74,7 @@ $databaseListener = function (string $event, Document $document, Document $proje //Project level sessions deduction if ($event === Database::EVENT_DOCUMENT_DELETE) { - $sessions = count($document->getAttribute('sessions')); + $sessions = count($document->getAttribute('sessions', 0)); if (!empty($sessions)) { $queueForUsage ->addMetric("sessions", ($sessions * -1)); // per project @@ -102,7 +102,7 @@ $databaseListener = function (string $event, Document $document, Document $proje break; case str_starts_with($document->getCollection(), 'database_') && !str_contains($document->getCollection(), 'collection'): //collections $parts = explode('_', $document->getCollection()); - $databaseId = $parts[1]; + $databaseId = $parts[1] ?? 0; $queueForUsage ->addMetric("collections", $value) // per project ->addMetric("{$databaseId}" . ".collections", $value) // per database @@ -119,8 +119,8 @@ $databaseListener = function (string $event, Document $document, Document $proje break; case str_starts_with($document->getCollection(), 'database_') && str_contains($document->getCollection(), '_collection_'): //documents $parts = explode('_', $document->getCollection()); - $databaseId = $parts[1]; - $collectionId = $parts[3]; + $databaseId = $parts[1] ?? 0; + $collectionId = $parts[3] ?? 0; $queueForUsage ->addMetric("documents", $value) // per project ->addMetric("{$databaseId}" . ".documents", $value) // per database @@ -575,7 +575,7 @@ App::shutdown() if ( $project->getId() !== 'console' - && $mode !== APP_MODE_ADMIN + //&& $mode !== APP_MODE_ADMIN ) { $fileSize = 0; $file = $request->getFiles('file'); From 395413738249fff0d7fea30c4c5c5da0d1e2ac8a Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 25 Dec 2022 19:16:38 +0200 Subject: [PATCH 40/94] minor adjustments --- app/controllers/shared/api.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 4fc5b6aa6..bd518fa5b 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -212,7 +212,7 @@ $databaseListener = function (string $event, Document $document, Document $proje $log = new Log(); $isProduction = App::getEnv('_APP_ENV', 'development') === 'production'; $log - ->setNamespace("appwrite-worker") + ->setNamespace("appwrite-stats-api") ->setServer(\gethostname()) ->setVersion(App::getEnv('_APP_VERSION', 'UNKNOWN')) ->setType(Log::TYPE_ERROR) @@ -220,6 +220,7 @@ $databaseListener = function (string $event, Document $document, Document $proje ->setAction('appwrite-queue-usage') ->addTag('verboseType', get_class($error)) ->addTag('code', $error->getCode()) + ->addExtra('event', $event) ->addExtra('collection', $document->getCollection()) ->addExtra('file', $error->getFile()) ->addExtra('line', $error->getLine()) From 44af531881301035a6f76816289fc0ebc68583fc Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 26 Dec 2022 11:11:13 +0200 Subject: [PATCH 41/94] tests adjustments --- .../Databases/DatabasesConsoleClientTest.php | 71 ++++++++----------- .../Functions/FunctionsConsoleClientTest.php | 17 +++-- .../Storage/StorageConsoleClientTest.php | 8 +-- .../Services/Users/UsersConsoleClientTest.php | 67 +++++++---------- 4 files changed, 66 insertions(+), 97 deletions(-) diff --git a/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php b/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php index 71fa7a590..cdbeda00b 100644 --- a/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php @@ -56,47 +56,39 @@ class DatabasesConsoleClientTest extends Scope /** * @depends testCreateCollection */ - // public function testGetDatabaseUsage(array $data) - // { - // $databaseId = $data['databaseId']; - // /** - // * Test for FAILURE - // */ + public function testGetDatabaseUsage(array $data) + { + $databaseId = $data['databaseId']; + /** + * Test for FAILURE + */ - // $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/usage', array_merge([ - // 'content-type' => 'application/json', - // 'x-appwrite-project' => $this->getProject()['$id'] - // ], $this->getHeaders()), [ - // 'range' => '32h' - // ]); + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/usage', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'range' => '32h' + ]); - // $this->assertEquals(400, $response['headers']['status-code']); + $this->assertEquals(400, $response['headers']['status-code']); - // /** - // * Test for SUCCESS - // */ + /** + * Test for SUCCESS + */ - // $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/usage', array_merge([ - // 'content-type' => 'application/json', - // 'x-appwrite-project' => $this->getProject()['$id'] - // ], $this->getHeaders()), [ - // 'range' => '24h' - // ]); + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/usage', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'range' => '24h' + ]); - // $this->assertEquals(200, $response['headers']['status-code']); - // $this->assertEquals(count($response['body']), 11); - // $this->assertEquals($response['body']['range'], '24h'); - // $this->assertIsArray($response['body']['documentsCount']); - // $this->assertIsArray($response['body']['collectionsCount']); - // $this->assertIsArray($response['body']['documentsCreate']); - // $this->assertIsArray($response['body']['documentsRead']); - // $this->assertIsArray($response['body']['documentsUpdate']); - // $this->assertIsArray($response['body']['documentsDelete']); - // $this->assertIsArray($response['body']['collectionsCreate']); - // $this->assertIsArray($response['body']['collectionsRead']); - // $this->assertIsArray($response['body']['collectionsUpdate']); - // $this->assertIsArray($response['body']['collectionsDelete']); - // } + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(count($response['body']), 3); + $this->assertEquals($response['body']['range'], '24h'); + $this->assertIsArray($response['body']['documentsCount']); + $this->assertIsArray($response['body']['collectionsCount']); + } /** @@ -136,15 +128,10 @@ class DatabasesConsoleClientTest extends Scope ], $this->getHeaders()), [ 'range' => '24h' ]); - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(count($response['body']), 6); + $this->assertEquals(count($response['body']), 2); $this->assertEquals($response['body']['range'], '24h'); $this->assertIsArray($response['body']['documentsCount']); - $this->assertIsArray($response['body']['documentsCreate']); - $this->assertIsArray($response['body']['documentsRead']); - $this->assertIsArray($response['body']['documentsUpdate']); - $this->assertIsArray($response['body']['documentsDelete']); } /** diff --git a/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php b/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php index 68b9ac46e..9cba3719c 100644 --- a/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php +++ b/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php @@ -90,16 +90,15 @@ class FunctionsConsoleClientTest extends Scope ]); $this->assertEquals($response['headers']['status-code'], 200); - $this->assertEquals(count($response['body']), 9); + $this->assertEquals(count($response['body']), 8); $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['executionsTotal']); - $this->assertIsArray($response['body']['executionsFailure']); - $this->assertIsArray($response['body']['executionsSuccess']); - $this->assertIsArray($response['body']['executionsTime']); - $this->assertIsArray($response['body']['buildsTotal']); - $this->assertIsArray($response['body']['buildsFailure']); - $this->assertIsArray($response['body']['buildsSuccess']); - $this->assertIsArray($response['body']['buildsTime']); + $this->assertIsArray($response['body']['deployments']); + $this->assertIsArray($response['body']['deploymentsStorage']); + $this->assertIsArray($response['body']['builds']); + $this->assertIsArray($response['body']['buildsStorage']); + $this->assertIsArray($response['body']['buildsCompute']); + $this->assertIsArray($response['body']['executions']); + $this->assertIsArray($response['body']['executionsCompute']); } /** diff --git a/tests/e2e/Services/Storage/StorageConsoleClientTest.php b/tests/e2e/Services/Storage/StorageConsoleClientTest.php index 8b4aaa1fc..24f40f50e 100644 --- a/tests/e2e/Services/Storage/StorageConsoleClientTest.php +++ b/tests/e2e/Services/Storage/StorageConsoleClientTest.php @@ -39,7 +39,7 @@ class StorageConsoleClientTest extends Scope ]); $this->assertEquals($response['headers']['status-code'], 200); - $this->assertEquals(12, count($response['body'])); + $this->assertEquals(3, count($response['body'])); $this->assertEquals($response['body']['range'], '24h'); $this->assertIsArray($response['body']['storage']); $this->assertIsArray($response['body']['filesCount']); @@ -94,13 +94,9 @@ class StorageConsoleClientTest extends Scope ]); $this->assertEquals($response['headers']['status-code'], 200); - $this->assertEquals(count($response['body']), 7); + $this->assertEquals(count($response['body']), 2); $this->assertEquals($response['body']['range'], '24h'); $this->assertIsArray($response['body']['filesCount']); - $this->assertIsArray($response['body']['filesCreate']); - $this->assertIsArray($response['body']['filesRead']); - $this->assertIsArray($response['body']['filesUpdate']); - $this->assertIsArray($response['body']['filesDelete']); $this->assertIsArray($response['body']['filesStorage']); } } diff --git a/tests/e2e/Services/Users/UsersConsoleClientTest.php b/tests/e2e/Services/Users/UsersConsoleClientTest.php index 9cc23e825..6c42a1101 100644 --- a/tests/e2e/Services/Users/UsersConsoleClientTest.php +++ b/tests/e2e/Services/Users/UsersConsoleClientTest.php @@ -23,43 +23,36 @@ class UsersConsoleClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ 'range' => '32h', - 'provider' => 'email' ]); $this->assertEquals($response['headers']['status-code'], 400); +// +// $response = $this->client->call(Client::METHOD_GET, '/users/usage', array_merge([ +// 'content-type' => 'application/json', +// 'x-appwrite-project' => $this->getProject()['$id'] +// ], $this->getHeaders()), [ +// 'range' => '24h', +// 'provider' => 'some-random-provider' +// ]); +// +// $this->assertEquals($response['headers']['status-code'], 400); - $response = $this->client->call(Client::METHOD_GET, '/users/usage', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'] - ], $this->getHeaders()), [ - 'range' => '24h', - 'provider' => 'some-random-provider' - ]); +// /** +// * Test for SUCCESS +// */ +// $response = $this->client->call(Client::METHOD_GET, '/users/usage', array_merge([ +// 'content-type' => 'application/json', +// 'x-appwrite-project' => $this->getProject()['$id'] +// ], $this->getHeaders()), [ +// 'range' => '24h', +// ]); +// +// $this->assertEquals($response['headers']['status-code'], 200); +// $this->assertEquals(count($response['body']), 2); +// $this->assertEquals($response['body']['range'], '24h'); +// $this->assertIsArray($response['body']['usersCount']); +// $this->assertIsArray($response['body']['sessionsCount']); - $this->assertEquals($response['headers']['status-code'], 400); - - /** - * Test for SUCCESS - */ - $response = $this->client->call(Client::METHOD_GET, '/users/usage', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'] - ], $this->getHeaders()), [ - 'range' => '24h', - 'provider' => 'email' - ]); - - $this->assertEquals($response['headers']['status-code'], 200); - $this->assertEquals(count($response['body']), 9); - $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['usersCount']); - $this->assertIsArray($response['body']['usersCreate']); - $this->assertIsArray($response['body']['usersRead']); - $this->assertIsArray($response['body']['usersUpdate']); - $this->assertIsArray($response['body']['usersDelete']); - $this->assertIsArray($response['body']['sessionsCreate']); - $this->assertIsArray($response['body']['sessionsProviderCreate']); - $this->assertIsArray($response['body']['sessionsDelete']); $response = $this->client->call(Client::METHOD_GET, '/users/usage', array_merge([ 'content-type' => 'application/json', @@ -69,15 +62,9 @@ class UsersConsoleClientTest extends Scope ]); $this->assertEquals($response['headers']['status-code'], 200); - $this->assertEquals(count($response['body']), 9); + $this->assertEquals(count($response['body']), 2); $this->assertEquals($response['body']['range'], '24h'); $this->assertIsArray($response['body']['usersCount']); - $this->assertIsArray($response['body']['usersCreate']); - $this->assertIsArray($response['body']['usersRead']); - $this->assertIsArray($response['body']['usersUpdate']); - $this->assertIsArray($response['body']['usersDelete']); - $this->assertIsArray($response['body']['sessionsCreate']); - $this->assertIsArray($response['body']['sessionsProviderCreate']); - $this->assertIsArray($response['body']['sessionsDelete']); + $this->assertIsArray($response['body']['sessionsCount']); } } From 4198cbfca535a7d007aff503a095006a5292612b Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 28 Dec 2022 18:27:26 +0200 Subject: [PATCH 42/94] moved reduce after delete document to usage-worker --- app/console | 2 +- app/controllers/shared/api.php | 80 +++--------------- app/workers/usage.php | 150 ++++++++++++++++++++++++++++++++- src/Appwrite/Event/Usage.php | 19 +++++ 4 files changed, 178 insertions(+), 73 deletions(-) diff --git a/app/console b/app/console index b1a81a390..af3d741ae 160000 --- a/app/console +++ b/app/console @@ -1 +1 @@ -Subproject commit b1a81a390a05746701651fca49e0d853f430677c +Subproject commit af3d741ae8f02c2e16b8b4ea4664a3f8970290fd diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index bd518fa5b..ea2def52b 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -53,15 +53,10 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar $databaseListener = function (string $event, Document $document, Document $project, Usage $queueForUsage, Database $dbForProject, Logger|null $logger) { $value = 1; - if ($event === Database::EVENT_DOCUMENT_DELETE) { $value = -1; } - /** - * On Documents that tied by relations like functions>deployments>build || documents>collection>database || buckets>files - * When we remove a parent document we need to deduct his children aggregation from the project scope - */ try { switch (true) { case $document->getCollection() === 'teams': @@ -71,14 +66,9 @@ $databaseListener = function (string $event, Document $document, Document $proje case $document->getCollection() === 'users': $queueForUsage ->addMetric("users", $value); // per project - - //Project level sessions deduction if ($event === Database::EVENT_DOCUMENT_DELETE) { - $sessions = count($document->getAttribute('sessions', 0)); - if (!empty($sessions)) { - $queueForUsage - ->addMetric("sessions", ($sessions * -1)); // per project - } + $queueForUsage + ->addReduce($document); } break; case $document->getCollection() === 'sessions': // sessions @@ -90,14 +80,8 @@ $databaseListener = function (string $event, Document $document, Document $proje ->addMetric("databases", $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { - //Project level collections/documents deduction - $collections = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".collections")); - $documents = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".documents")); - if (!empty($collections['value'])) { - $queueForUsage - ->addMetric("collections", ($collections['value'] * -1)) - ->addMetric("documents", ($documents['value'] * -1)); - } + $queueForUsage + ->addReduce($document); } break; case str_starts_with($document->getCollection(), 'database_') && !str_contains($document->getCollection(), 'collection'): //collections @@ -109,12 +93,8 @@ $databaseListener = function (string $event, Document $document, Document $proje ; if ($event === Database::EVENT_DOCUMENT_DELETE) { - //Project documents deduction - $documents = $dbForProject->getDocument('stats', md5("_inf_" . "{$databaseId}" . ".documents")); - if (!empty($documents['value'])) { - $queueForUsage - ->addMetric("documents", ($documents['value'] * -1)); - } + $queueForUsage + ->addReduce($document); } break; case str_starts_with($document->getCollection(), 'database_') && str_contains($document->getCollection(), '_collection_'): //documents @@ -127,20 +107,12 @@ $databaseListener = function (string $event, Document $document, Document $proje ->addMetric("{$databaseId}" . "." . "{$collectionId}" . ".documents", $value) // per collection ; break; - case $document->getCollection() === 'buckets': + case $document->getCollection() === 'buckets': //buckets $queueForUsage ->addMetric("buckets", $value); // per project - if ($event === Database::EVENT_DOCUMENT_DELETE) { - //Project files/files.storage deduction - $files = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".files")); - $storage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".files.storage")); - - if (!empty($files['value'])) { - $queueForUsage - ->addMetric("files", ($files['value'] * -1)) - ->addMetric("files.storage", ($storage['value'] * -1)); - } + $queueForUsage + ->addReduce($document); } break; case str_starts_with($document->getCollection(), 'bucket_'): // files @@ -155,39 +127,11 @@ $databaseListener = function (string $event, Document $document, Document $proje break; case $document->getCollection() === 'functions': $queueForUsage - ->addMetric("functions", $value); // per project + ->addMetric('functions', $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { - //Project level function/builds/executions deduction - $deployments = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getInternalId()}" . ".deployments")); - $deploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getInternalId()}" . ".deployments.storage")); - $builds = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".builds")); - $buildsStorage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".builds.storage")); - $buildsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".builds.compute")); - $executions = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".executions")); - $executionsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".executions.compute")); - - if (!empty($deployments['value'])) { - $queueForUsage - ->addMetric("deployments", ($deployments['value'] * -1)) - ->addMetric("deployments.storage", ($deploymentsStorage['value'] * -1)) - ; - } - - if (!empty($builds['value'])) { - $queueForUsage - ->addMetric("builds", ($builds['value'] * -1)) - ->addMetric("builds.storage", ($buildsStorage['value'] * -1)) - ->addMetric("builds.compute", ($buildsCompute['value'] * -1)) - ; - } - - if (!empty($executions['value'])) { - $queueForUsage - ->addMetric("executions", ($executions['value'] * -1)) - ->addMetric("executions.compute", ($executionsCompute['value'] * -1)) - ; - } + $queueForUsage + ->addReduce($document); } break; case $document->getCollection() === 'deployments': diff --git a/app/workers/usage.php b/app/workers/usage.php index 947583947..a3f707b41 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -4,6 +4,7 @@ require_once __DIR__ . '/../worker.php'; use Swoole\Timer; use Utopia\App; +use Utopia\Cache\Cache; use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; @@ -11,6 +12,8 @@ use Utopia\Database\Exception\Duplicate; use Utopia\Database\Validator\Authorization; use Utopia\Queue\Message; use Utopia\CLI\Console; +use Utopia\Queue\Server; +use Utopia\Registry\Registry; Authorization::disable(); Authorization::setDefaultStatus(false); @@ -22,13 +25,152 @@ $periods['1d'] = 'Y-m-d 00:00'; //$periods['1m'] = 'Y-m-1 00:00'; $periods['inf'] = '0000-00-00 00:00'; +/** + * On Documents that tied by relations like functions>deployments>build || documents>collection>database || buckets>files + * When we remove a parent document we need to deduct his children aggregation from the project scope + */ +Server::setResource('reduce', function (Cache $cache, Registry $register, $pools) { + return function ($database, $projectInternalId, Document $document, array &$metrics) use ($pools, $cache, $register): void { + try { + $dbForProject = new Database( + $pools + ->get($database) + ->pop() + ->getResource(), + $cache + ); + + $dbForProject->setNamespace('_' . $projectInternalId); + + switch (true) { + case $document->getCollection() === 'users': + $sessions = count($document->getAttribute('sessions', 0)); + if (!empty($sessions)) { + $metrics[] = [ + 'key' => 'sessions', + 'value' => ($sessions * -1), + ]; + } + break; + case $document->getCollection() === 'databases': // databases + $collections = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".collections")); + $documents = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".documents")); + if (!empty($collections['value'])) { + $metrics[] = [ + 'key' => 'collections', + 'value' => ($collections['value'] * -1), + ]; + $metrics[] = [ + 'key' => 'documents', + 'value' => ($documents['value'] * -1), + ]; + } + break; + case str_starts_with($document->getCollection(), 'database_') && !str_contains($document->getCollection(), 'collection'): //collections + $parts = explode('_', $document->getCollection()); + $databaseId = $parts[1] ?? 0; + $documents = $dbForProject->getDocument('stats', md5("_inf_" . "{$databaseId}" . ".documents")); + if (!empty($documents['value'])) { + $metrics[] = [ + 'key' => 'documents', + 'value' => ($documents['value'] * -1), + ]; + } + break; + + case $document->getCollection() === 'buckets': + $files = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".files")); + $storage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".files.storage")); + + if (!empty($files['value'])) { + $metrics[] = [ + 'key' => 'files', + 'value' => ($files['value'] * -1), + ]; + $metrics[] = [ + 'key' => 'files.storage', + 'value' => ($storage['value'] * -1), + ]; + } + break; + + case $document->getCollection() === 'functions': + $deployments = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getInternalId()}" . ".deployments")); + $deploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getInternalId()}" . ".deployments.storage")); + $builds = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".builds")); + $buildsStorage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".builds.storage")); + $buildsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".builds.compute")); + $executions = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".executions")); + $executionsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".executions.compute")); + + if (!empty($deployments['value'])) { + $metrics[] = [ + 'key' => 'deployments', + 'value' => ($deployments['value'] * -1), + ]; + $metrics[] = [ + 'key' => 'deployments.storage', + 'value' => ($deploymentsStorage['value'] * -1), + ]; + } + + if (!empty($builds['value'])) { + $metrics[] = [ + 'key' => 'builds', + 'value' => ($builds['value'] * -1), + ]; + $metrics[] = [ + 'key' => 'builds.storage', + 'value' => ($buildsStorage['value'] * -1), + ]; + $metrics[] = [ + 'key' => 'builds.compute', + 'value' => ($buildsCompute['value'] * -1), + ]; + } + + if (!empty($executions['value'])) { + $metrics[] = [ + 'key' => 'executions', + 'value' => ($executions['value'] * -1), + ]; + $metrics[] = [ + 'key' => 'executions.compute', + 'value' => ($executionsCompute['value'] * -1), + ]; + } + break; + default: + break; + } + } catch (\Exception $e) { + console::error($e->getMessage()); + } finally { + $pools->reclaim(); + } + }; +}, ['cache', 'register', 'pools']); + + $server->job() ->inject('message') - ->action(function (Message $message) use (&$stats) { + ->inject('reduce') + + ->action(function (Message $message, callable $reduce) use (&$stats) { $payload = $message->getPayload() ?? []; $project = new Document($payload['project'] ?? []); $projectId = $project->getInternalId(); + + foreach ($payload['reduce'] ?? [] as $document) { + $reduce( + database: $project->getAttribute('database'), + projectInternalId: $project->getInternalId(), + document: new Document($document ?? []), + metrics: $payload['metrics'], + ); + } + $stats[$projectId]['database'] = $project->getAttribute('database'); foreach ($payload['metrics'] ?? [] as $metric) { @@ -56,9 +198,9 @@ $server try { $dbForProject = new Database( $pools - ->get($project['database']) - ->pop() - ->getResource(), + ->get($project['database']) + ->pop() + ->getResource(), $cache ); diff --git a/src/Appwrite/Event/Usage.php b/src/Appwrite/Event/Usage.php index 00ef7c17f..f046914c8 100644 --- a/src/Appwrite/Event/Usage.php +++ b/src/Appwrite/Event/Usage.php @@ -4,16 +4,32 @@ namespace Appwrite\Event; use Utopia\Queue\Client; use Utopia\Queue\Connection; +use Utopia\Database\Document; class Usage extends Event { protected array $metrics = []; + protected array $reduce = []; public function __construct(protected Connection $connection) { parent::__construct(Event::USAGE_QUEUE_NAME, Event::USAGE_CLASS_NAME); } + /** + * Add reduce. + * + * @param Document $document + * @return self + */ + public function addReduce(Document $document): self + { + $this->reduce[] = $document; + + return $this; + } + + /** * Add metric. * @@ -31,6 +47,8 @@ class Usage extends Event return $this; } + + /** * Sends metrics to the usage worker. * @@ -42,6 +60,7 @@ class Usage extends Event return $client->enqueue([ 'project' => $this->getProject(), + 'reduce' => $this->reduce, 'metrics' => $this->metrics, ]); } From db8b24ee229dd0f102fe249889b6a8b8dd984ed4 Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 28 Dec 2022 20:06:57 +0200 Subject: [PATCH 43/94] moved reduce after delete document to usage-worker --- app/workers/usage.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/workers/usage.php b/app/workers/usage.php index a3f707b41..ca54f7663 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -69,12 +69,17 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools case str_starts_with($document->getCollection(), 'database_') && !str_contains($document->getCollection(), 'collection'): //collections $parts = explode('_', $document->getCollection()); $databaseId = $parts[1] ?? 0; - $documents = $dbForProject->getDocument('stats', md5("_inf_" . "{$databaseId}" . ".documents")); + $documents = $dbForProject->getDocument('stats', md5("_inf_" . "{$databaseId}" . "." . "{$document->getInternalId()}" . ".documents")); + if (!empty($documents['value'])) { $metrics[] = [ 'key' => 'documents', 'value' => ($documents['value'] * -1), ]; + $metrics[] = [ + 'key' => "{$databaseId}" . ".documents", + 'value' => ($documents['value'] * -1), + ]; } break; From 8941af0677da7f3c8c78fdeabae48fbc1104504e Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 29 Dec 2022 13:32:00 +0200 Subject: [PATCH 44/94] minor adjustments --- app/controllers/shared/api.php | 2 ++ app/workers/usage.php | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index ea2def52b..a337ad7af 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -198,6 +198,8 @@ App::init() $route = $utopia->match($request); + var_dump($route->getPath()); + if ($project->isEmpty() && $route->getLabel('abuse-limit', 0) > 0) { // Abuse limit requires an active project scope throw new Exception(Exception::PROJECT_UNKNOWN); } diff --git a/app/workers/usage.php b/app/workers/usage.php index ca54f7663..0d2f5d05b 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -43,7 +43,7 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools $dbForProject->setNamespace('_' . $projectInternalId); switch (true) { - case $document->getCollection() === 'users': + case $document->getCollection() === 'users': // users $sessions = count($document->getAttribute('sessions', 0)); if (!empty($sessions)) { $metrics[] = [ @@ -60,6 +60,8 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools 'key' => 'collections', 'value' => ($collections['value'] * -1), ]; + } + if (!empty($documents['value'])) { $metrics[] = [ 'key' => 'documents', 'value' => ($documents['value'] * -1), @@ -149,7 +151,7 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools break; } } catch (\Exception $e) { - console::error($e->getMessage()); + console::error("[reducer] " . " {DateTime::now()} " . " {$projectInternalId} " . " {$e->getMessage()}"); } finally { $pools->reclaim(); } @@ -168,10 +170,14 @@ $server->job() $projectId = $project->getInternalId(); foreach ($payload['reduce'] ?? [] as $document) { + if (empty($document)) { + continue; + } + $reduce( database: $project->getAttribute('database'), projectInternalId: $project->getInternalId(), - document: new Document($document ?? []), + document: new Document($document), metrics: $payload['metrics'], ); } @@ -253,7 +259,7 @@ $server 'metrics' => $project['keys'], ])); } catch (\Exception $e) { - console::error($e->getMessage()); + console::error("[logger] " . " {DateTime::now()} " . " {$projectInternalId} " . " {$e->getMessage()}"); } finally { $pools->reclaim(); } From 3d2ac6b2d6ab8548822d3d59dd91cfad62e73fd2 Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 29 Dec 2022 17:36:00 +0200 Subject: [PATCH 45/94] minor adjustments --- app/controllers/shared/api.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index a337ad7af..1234e8468 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -104,8 +104,7 @@ $databaseListener = function (string $event, Document $document, Document $proje $queueForUsage ->addMetric("documents", $value) // per project ->addMetric("{$databaseId}" . ".documents", $value) // per database - ->addMetric("{$databaseId}" . "." . "{$collectionId}" . ".documents", $value) // per collection - ; + ->addMetric("{$databaseId}" . "." . "{$collectionId}" . ".documents", $value); // per collection break; case $document->getCollection() === 'buckets': //buckets $queueForUsage @@ -122,8 +121,7 @@ $databaseListener = function (string $event, Document $document, Document $proje ->addMetric("files", $value) // per project ->addMetric("files.storage", $document->getAttribute('sizeOriginal') * $value) // per project ->addMetric("{$bucketId}" . ".files", $value) // per bucket - ->addMetric("{$bucketId}" . ".files.storage", $document->getAttribute('sizeOriginal') * $value)// per bucket - ; + ->addMetric("{$bucketId}" . ".files.storage", $document->getAttribute('sizeOriginal') * $value);// per bucket break; case $document->getCollection() === 'functions': $queueForUsage @@ -139,14 +137,12 @@ $databaseListener = function (string $event, Document $document, Document $proje ->addMetric("deployments", $value) // per project ->addMetric("deployments.storage", $document->getAttribute('size') * $value) // per project ->addMetric("{$document->getAttribute('resourceType')}" . "." . "{$document->getAttribute('resourceInternalId')}" . ".deployments", $value)// per function - ->addMetric("{$document->getAttribute('resourceType')}" . "." . "{$document->getAttribute('resourceInternalId')}" . ".deployments.storage", $document->getAttribute('size') * $value) // per function - ; + ->addMetric("{$document->getAttribute('resourceType')}" . "." . "{$document->getAttribute('resourceInternalId')}" . ".deployments.storage", $document->getAttribute('size') * $value); // per function break; case $document->getCollection() === 'executions': $queueForUsage ->addMetric("executions", $value) // per project - ->addMetric("{$document->getAttribute('functionInternalId')}" . ".executions", $value) // per function - ; + ->addMetric("{$document->getAttribute('functionInternalId')}" . ".executions", $value); // per function break; default: break; @@ -171,8 +167,7 @@ $databaseListener = function (string $event, Document $document, Document $proje ->addExtra('trace', $error->getTraceAsString()) ->addExtra('detailedTrace', $error->getTrace()) ->addExtra('roles', \Utopia\Database\Validator\Authorization::$roles) - ->setEnvironment($isProduction ? Log::ENVIRONMENT_PRODUCTION : Log::ENVIRONMENT_STAGING) - ; + ->setEnvironment($isProduction ? Log::ENVIRONMENT_PRODUCTION : Log::ENVIRONMENT_STAGING); $logger->addLog($log); } } From 9a2f734d3af225d875efbac1630928899c56d346 Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 12 Jan 2023 18:06:20 +0200 Subject: [PATCH 46/94] compose.lock --- app/controllers/api/users.php | 1 - app/controllers/shared/api.php | 4 +-- src/Appwrite/Event/Usage.php | 3 -- tests/e2e/General/UsageTest.php | 1 - .../Storage/StorageConsoleClientTest.php | 8 +++-- .../Services/Users/UsersConsoleClientTest.php | 35 ++++--------------- 6 files changed, 12 insertions(+), 40 deletions(-) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 44ef69008..0df53a0df 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -1128,7 +1128,6 @@ App::get('/v1/users/usage') 'date' => $formatDate, ]; } - //$usage[$metric] = array_reverse($usage[$metric]); } $response->dynamic(new Document([ diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 1234e8468..00fe567d7 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -193,8 +193,6 @@ App::init() $route = $utopia->match($request); - var_dump($route->getPath()); - if ($project->isEmpty() && $route->getLabel('abuse-limit', 0) > 0) { // Abuse limit requires an active project scope throw new Exception(Exception::PROJECT_UNKNOWN); } @@ -517,7 +515,7 @@ App::shutdown() if ( $project->getId() !== 'console' - //&& $mode !== APP_MODE_ADMIN + && $mode !== APP_MODE_ADMIN ) { $fileSize = 0; $file = $request->getFiles('file'); diff --git a/src/Appwrite/Event/Usage.php b/src/Appwrite/Event/Usage.php index f046914c8..b302b8880 100644 --- a/src/Appwrite/Event/Usage.php +++ b/src/Appwrite/Event/Usage.php @@ -29,7 +29,6 @@ class Usage extends Event return $this; } - /** * Add metric. * @@ -47,8 +46,6 @@ class Usage extends Event return $this; } - - /** * Sends metrics to the usage worker. * diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index abaac548c..67e911b1e 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -283,7 +283,6 @@ class UsageTest extends Scope $this->assertEquals(30, count($res['storage'])); $this->assertEquals($requestsCount, $res['requests'][array_key_last($res['requests'])]['value']); $this->validateDates($res['requests']); - $this->assertEquals($storageTotal, $res['storage'][array_key_last($res['storage'])]['value']); $this->validateDates($res['storage']); diff --git a/tests/e2e/Services/Storage/StorageConsoleClientTest.php b/tests/e2e/Services/Storage/StorageConsoleClientTest.php index 24f40f50e..de059b180 100644 --- a/tests/e2e/Services/Storage/StorageConsoleClientTest.php +++ b/tests/e2e/Services/Storage/StorageConsoleClientTest.php @@ -39,10 +39,12 @@ class StorageConsoleClientTest extends Scope ]); $this->assertEquals($response['headers']['status-code'], 200); - $this->assertEquals(3, count($response['body'])); + $this->assertEquals(4, count($response['body'])); $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['storage']); + $this->assertIsArray($response['body']['bucketsCount']); $this->assertIsArray($response['body']['filesCount']); + $this->assertIsArray($response['body']['filesStorage']); + } public function testGetStorageBucketUsage() @@ -94,7 +96,7 @@ class StorageConsoleClientTest extends Scope ]); $this->assertEquals($response['headers']['status-code'], 200); - $this->assertEquals(count($response['body']), 2); + $this->assertEquals(count($response['body']), 3); $this->assertEquals($response['body']['range'], '24h'); $this->assertIsArray($response['body']['filesCount']); $this->assertIsArray($response['body']['filesStorage']); diff --git a/tests/e2e/Services/Users/UsersConsoleClientTest.php b/tests/e2e/Services/Users/UsersConsoleClientTest.php index 6c42a1101..6bb889072 100644 --- a/tests/e2e/Services/Users/UsersConsoleClientTest.php +++ b/tests/e2e/Services/Users/UsersConsoleClientTest.php @@ -26,45 +26,22 @@ class UsersConsoleClientTest extends Scope ]); $this->assertEquals($response['headers']['status-code'], 400); -// -// $response = $this->client->call(Client::METHOD_GET, '/users/usage', array_merge([ -// 'content-type' => 'application/json', -// 'x-appwrite-project' => $this->getProject()['$id'] -// ], $this->getHeaders()), [ -// 'range' => '24h', -// 'provider' => 'some-random-provider' -// ]); -// -// $this->assertEquals($response['headers']['status-code'], 400); - -// /** -// * Test for SUCCESS -// */ -// $response = $this->client->call(Client::METHOD_GET, '/users/usage', array_merge([ -// 'content-type' => 'application/json', -// 'x-appwrite-project' => $this->getProject()['$id'] -// ], $this->getHeaders()), [ -// 'range' => '24h', -// ]); -// -// $this->assertEquals($response['headers']['status-code'], 200); -// $this->assertEquals(count($response['body']), 2); -// $this->assertEquals($response['body']['range'], '24h'); -// $this->assertIsArray($response['body']['usersCount']); -// $this->assertIsArray($response['body']['sessionsCount']); - + /** + * Test for SUCCESS + */ $response = $this->client->call(Client::METHOD_GET, '/users/usage', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ - 'range' => '24h' + 'range' => '24h', ]); $this->assertEquals($response['headers']['status-code'], 200); - $this->assertEquals(count($response['body']), 2); + $this->assertEquals(count($response['body']), 3); $this->assertEquals($response['body']['range'], '24h'); $this->assertIsArray($response['body']['usersCount']); $this->assertIsArray($response['body']['sessionsCount']); + } } From b61e6e0d5aec328f3e0423f66096e186bba0665f Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 12 Jan 2023 19:41:14 +0200 Subject: [PATCH 47/94] usage test --- app/workers/usage.php | 18 +++++++++++++++++- tests/e2e/General/UsageTest.php | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/app/workers/usage.php b/app/workers/usage.php index 0d2f5d05b..127f58a7c 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -61,6 +61,7 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools 'value' => ($collections['value'] * -1), ]; } + if (!empty($documents['value'])) { $metrics[] = [ 'key' => 'documents', @@ -94,6 +95,9 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools 'key' => 'files', 'value' => ($files['value'] * -1), ]; + } + + if (!empty($storage['value'])) { $metrics[] = [ 'key' => 'files.storage', 'value' => ($storage['value'] * -1), @@ -115,6 +119,9 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools 'key' => 'deployments', 'value' => ($deployments['value'] * -1), ]; + } + + if (!empty($deploymentsStorage['value'])) { $metrics[] = [ 'key' => 'deployments.storage', 'value' => ($deploymentsStorage['value'] * -1), @@ -126,10 +133,16 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools 'key' => 'builds', 'value' => ($builds['value'] * -1), ]; + } + + if (!empty($buildsStorage['value'])) { $metrics[] = [ 'key' => 'builds.storage', 'value' => ($buildsStorage['value'] * -1), ]; + } + + if (!empty($buildsCompute['value'])) { $metrics[] = [ 'key' => 'builds.compute', 'value' => ($buildsCompute['value'] * -1), @@ -139,8 +152,11 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools if (!empty($executions['value'])) { $metrics[] = [ 'key' => 'executions', - 'value' => ($executions['value'] * -1), + 'value' => ($executionsCompute['value'] * -1), ]; + } + + if (!empty($executionsCompute['value'])) { $metrics[] = [ 'key' => 'executions.compute', 'value' => ($executionsCompute['value'] * -1), diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index 67e911b1e..6fffb037a 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -18,7 +18,7 @@ class UsageTest extends Scope use SideServer; use FunctionsBase; - private const WAIT = 30; + private const WAIT = 35; private const CREATE = 20; protected string $projectId; From 44af561d066777cf5a69679e2bfd2046f4b169ff Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 15 Jan 2023 12:03:52 +0200 Subject: [PATCH 48/94] usage test --- composer.lock | 66 +++++------ .../Functions/FunctionsCustomServerTest.php | 3 +- tests/resources/docker/docker-compose.yml | 108 ++++++++++------- tests/unit/Usage/StatsTest.php | 111 ++++++++---------- 4 files changed, 149 insertions(+), 139 deletions(-) diff --git a/composer.lock b/composer.lock index 16154982a..651bf42d8 100644 --- a/composer.lock +++ b/composer.lock @@ -2696,30 +2696,30 @@ }, { "name": "doctrine/instantiator", - "version": "1.4.1", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9", + "doctrine/coding-standard": "^9 || ^11", "ext-pdo": "*", "ext-phar": "*", "phpbench/phpbench": "^0.16 || ^1", "phpstan/phpstan": "^1.4", "phpstan/phpstan-phpunit": "^1", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", "autoload": { @@ -2746,7 +2746,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, "funding": [ { @@ -2762,7 +2762,7 @@ "type": "tidelift" } ], - "time": "2022-03-03T08:28:38+00:00" + "time": "2022-12-30T00:15:36+00:00" }, { "name": "doctrine/lexer", @@ -3618,16 +3618,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.22", + "version": "9.2.23", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "e4bf60d2220b4baaa0572986b5d69870226b06df" + "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/e4bf60d2220b4baaa0572986b5d69870226b06df", - "reference": "e4bf60d2220b4baaa0572986b5d69870226b06df", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", + "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", "shasum": "" }, "require": { @@ -3683,7 +3683,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.22" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.23" }, "funding": [ { @@ -3691,7 +3691,7 @@ "type": "github" } ], - "time": "2022-12-18T16:40:55+00:00" + "time": "2022-12-28T12:41:10+00:00" }, { "name": "phpunit/php-file-iterator", @@ -5267,16 +5267,16 @@ }, { "name": "symfony/console", - "version": "v5.4.16", + "version": "v5.4.17", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef" + "reference": "58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/8e9b9c8dfb33af6057c94e1b44846bee700dc5ef", - "reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef", + "url": "https://api.github.com/repos/symfony/console/zipball/58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f", + "reference": "58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f", "shasum": "" }, "require": { @@ -5346,7 +5346,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.16" + "source": "https://github.com/symfony/console/tree/v5.4.17" }, "funding": [ { @@ -5362,7 +5362,7 @@ "type": "tidelift" } ], - "time": "2022-11-25T14:09:27+00:00" + "time": "2022-12-28T14:15:31+00:00" }, { "name": "symfony/deprecation-contracts", @@ -5497,16 +5497,16 @@ }, { "name": "symfony/finder", - "version": "v5.4.11", + "version": "v5.4.17", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c" + "reference": "40c08632019838dfb3350f18cf5563b8080055fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/7872a66f57caffa2916a584db1aa7f12adc76f8c", - "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c", + "url": "https://api.github.com/repos/symfony/finder/zipball/40c08632019838dfb3350f18cf5563b8080055fc", + "reference": "40c08632019838dfb3350f18cf5563b8080055fc", "shasum": "" }, "require": { @@ -5540,7 +5540,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.11" + "source": "https://github.com/symfony/finder/tree/v5.4.17" }, "funding": [ { @@ -5556,7 +5556,7 @@ "type": "tidelift" } ], - "time": "2022-07-29T07:37:50+00:00" + "time": "2022-12-22T10:31:03+00:00" }, { "name": "symfony/options-resolver", @@ -6370,16 +6370,16 @@ }, { "name": "twig/twig", - "version": "v3.4.3", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "c38fd6b0b7f370c198db91ffd02e23b517426b58" + "reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/c38fd6b0b7f370c198db91ffd02e23b517426b58", - "reference": "c38fd6b0b7f370c198db91ffd02e23b517426b58", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/3ffcf4b7d890770466da3b2666f82ac054e7ec72", + "reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72", "shasum": "" }, "require": { @@ -6394,7 +6394,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "3.5-dev" } }, "autoload": { @@ -6430,7 +6430,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.4.3" + "source": "https://github.com/twigphp/Twig/tree/v3.5.0" }, "funding": [ { @@ -6442,7 +6442,7 @@ "type": "tidelift" } ], - "time": "2022-09-28T08:42:51+00:00" + "time": "2022-12-27T12:28:18+00:00" }, { "name": "webmozart/glob", diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index e2d7b8482..e97c1412b 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -635,7 +635,7 @@ class FunctionsCustomServerTest extends Scope $this->assertStringContainsString('8.0', $execution['body']['response']); $this->assertStringContainsString('êä', $execution['body']['response']); // tests unknown utf-8 chars $this->assertEquals('', $execution['body']['stderr']); - $this->assertLessThan(1.500, $execution['body']['duration']); + $this->assertLessThan(3, $execution['body']['duration']); /** * Test for FAILURE @@ -915,7 +915,6 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals($executions['body']['executions'][0]['statusCode'], 500); $this->assertGreaterThan(2, $executions['body']['executions'][0]['duration']); $this->assertLessThan(6, $executions['body']['executions'][0]['duration']); - $this->assertGreaterThan(4, $executions['body']['executions'][0]['duration']); $this->assertEquals($executions['body']['executions'][0]['response'], ''); $this->assertEquals($executions['body']['executions'][0]['stderr'], 'An internal curl error has occurred within the executor! Error Msg: Operation timed out'); diff --git a/tests/resources/docker/docker-compose.yml b/tests/resources/docker/docker-compose.yml index f7a6138bd..36bc43456 100644 --- a/tests/resources/docker/docker-compose.yml +++ b/tests/resources/docker/docker-compose.yml @@ -36,7 +36,7 @@ services: - TESTING=true - VERSION=dev restart: unless-stopped - ports: + ports: - 9501:80 networks: - appwrite @@ -63,7 +63,7 @@ services: - mariadb - redis # - clamav - + - influxdb environment: - _APP_ENV - _APP_OPTIONS_ABUSE @@ -79,6 +79,8 @@ services: - _APP_DB_USER - _APP_DB_PASS - _APP_USAGE_STATS + - _APP_INFLUXDB_HOST + - _APP_INFLUXDB_PORT - _APP_STORAGE_ANTIVIRUS=disabled - _APP_STORAGE_LIMIT - _APP_FUNCTIONS_TIMEOUT @@ -88,42 +90,23 @@ services: - _APP_FUNCTIONS_MEMORY_SWAP - _APP_EXECUTOR_HOST -appwrite-worker-usage: - entrypoint: worker-usage - <<: *x-logging - container_name: appwrite-worker-usage - image: appwrite-dev - networks: - - appwrite - volumes: - - ./app:/usr/src/code/app - - ./src:/usr/src/code/src - - ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database - depends_on: - - redis - - mariadb - environment: - - _APP_ENV - - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - - _APP_OPENSSL_KEY_V1 - - _APP_DB_HOST - - _APP_DB_PORT - - _APP_DB_SCHEMA - - _APP_DB_USER - - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - - _APP_USAGE_STATS - - DOCKERHUB_PULL_USERNAME - - DOCKERHUB_PULL_PASSWORD + appwrite-worker-usage: + entrypoint: worker-usage + container_name: appwrite-worker-usage + build: + context: . + restart: unless-stopped + networks: + - appwrite + depends_on: + - redis + - telegraf + environment: + - _APP_ENV + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_STATSD_HOST + - _APP_STATSD_PORT appwrite-worker-audits: entrypoint: worker-audits @@ -199,7 +182,7 @@ appwrite-worker-usage: depends_on: - redis - mariadb - volumes: + volumes: - appwrite-uploads:/storage/uploads:rw - appwrite-cache:/storage/cache:rw environment: @@ -224,7 +207,7 @@ appwrite-worker-usage: depends_on: - redis - mariadb - volumes: + volumes: - appwrite-config:/storage/config:rw - appwrite-certificates:/storage/certificates:rw environment: @@ -286,7 +269,7 @@ appwrite-worker-usage: - _APP_REDIS_PORT - _APP_SMTP_HOST - _APP_SMTP_PORT - + appwrite-worker-builds: entrypoint: worker-builds container_name: appwrite-worker-builds @@ -294,7 +277,7 @@ appwrite-worker-usage: context: . networks: - appwrite - volumes: + volumes: - ./app:/usr/src/code/app - ./src:/usr/src/code/src depends_on: @@ -384,6 +367,23 @@ appwrite-worker-usage: # - appwrite # volumes: # - appwrite-uploads:/storage/uploads + + influxdb: + image: influxdb:1.6 + container_name: appwrite-influxdb + restart: unless-stopped + networks: + - appwrite + volumes: + - appwrite-influxdb:/var/lib/influxdb:rw + + telegraf: + image: appwrite/telegraf:1.1.0 + container_name: appwrite-telegraf + restart: unless-stopped + networks: + - appwrite + # redis-commander: # image: rediscommander/redis-commander:latest # restart: unless-stopped @@ -406,6 +406,26 @@ appwrite-worker-usage: # - RESQUE_WEB_PORT=6379 # - RESQUE_WEB_HTTP_BASIC_AUTH_USER=user # - RESQUE_WEB_HTTP_BASIC_AUTH_PASSWORD=password + + # chronograf: + # image: chronograf:1.5 + # container_name: appwrite-chronograf + # restart: unless-stopped + # networks: + # - appwrite + # volumes: + # - appwrite-chronograf:/var/lib/chronograf + # ports: + # - "8888:8888" + # environment: + # - INFLUXDB_URL=http://influxdb:8086 + # - KAPACITOR_URL=http://kapacitor:9092 + # - AUTH_DURATION=48h + # - TOKEN_SECRET=duperduper5674829!jwt + # - GH_CLIENT_ID=d86f7145a41eacfc52cc + # - GH_CLIENT_SECRET=9e0081062367a2134e7f2ea95ba1a32d08b6c8ab + # - GH_ORGS=appwrite + # webgrind: # image: 'jokkedk/webgrind:latest' # volumes: @@ -424,4 +444,6 @@ volumes: appwrite-uploads: appwrite-certificates: appwrite-functions: - appwrite-config: + appwrite-influxdb: + appwrite-chronograf: + appwrite-config: \ No newline at end of file diff --git a/tests/unit/Usage/StatsTest.php b/tests/unit/Usage/StatsTest.php index c00ad621e..c728a5773 100644 --- a/tests/unit/Usage/StatsTest.php +++ b/tests/unit/Usage/StatsTest.php @@ -2,70 +2,59 @@ namespace Tests\Unit\Usage; -use Appwrite\Usage\Stats; +use Appwrite\URL\URL as AppwriteURL; use PHPUnit\Framework\TestCase; use Utopia\App; +use Utopia\DSN\DSN; +use Utopia\Queue; +use Utopia\Queue\Client; +use Utopia\Queue\Connection; class StatsTest extends TestCase { -// /** -// * @var Stats -// */ -// protected $object = null; -// -// public function setUp(): void -// { -// $host = App::getEnv('_APP_STATSD_HOST', 'telegraf'); -// $port = App::getEnv('_APP_STATSD_PORT', 8125); -// -// $connection = new \Domnikl\Statsd\Connection\UdpSocket($host, $port); -// $statsd = new \Domnikl\Statsd\Client($connection); -// -// $this->object = new Stats($statsd); -// } -// -// public function tearDown(): void -// { -// } -// -// public function testNamespace(): void -// { -// $this->object->setNamespace('appwritetest.usage'); -// $this->assertEquals('appwritetest.usage', $this->object->getNamespace()); -// } -// -// public function testParams(): void -// { -// $this->object -// ->setParam('projectId', 'appwrite_test') -// ->setParam('projectInternalId', 1) -// ->setParam('networkRequestSize', 100) -// ; -// -// $this->assertEquals('appwrite_test', $this->object->getParam('projectId')); -// $this->assertEquals(1, $this->object->getParam('projectInternalId')); -// $this->assertEquals(100, $this->object->getParam('networkRequestSize')); -// -// $this->object->submit(); -// -// $this->assertEquals(null, $this->object->getParam('projectId')); -// $this->assertEquals(null, $this->object->getParam('networkRequestSize')); -// } -// -// public function testReset(): void -// { -// $this->object -// ->setParam('projectId', 'appwrite_test') -// ->setParam('networkRequestSize', 100) -// ; -// -// $this->assertEquals('appwrite_test', $this->object->getParam('projectId')); -// $this->assertEquals(100, $this->object->getParam('networkRequestSize')); -// -// $this->object->reset(); -// -// $this->assertEquals(null, $this->object->getParam('projectId')); -// $this->assertEquals(null, $this->object->getParam('networkRequestSize')); -// $this->assertEquals('appwrite.usage', $this->object->getNamespace()); -// } + /** + * @var Connection + */ + protected ?Connection $connection = null; + /** + * @var Client + */ + protected ?Client $client = null; + + const QUEUE_NAME = 'usage-test-q'; + + public function setUp(): void + { + $env = App::getEnv('_APP_CONNECTIONS_QUEUE', AppwriteURL::unparse([ + 'scheme' => 'redis', + 'host' => App::getEnv('_APP_REDIS_HOST', 'redis'), + 'port' => App::getEnv('_APP_REDIS_PORT', '6379'), + 'user' => App::getEnv('_APP_REDIS_USER', ''), + 'pass' => App::getEnv('_APP_REDIS_PASS', ''), + ])); + + $dsn = explode('=', $env); + $dsn = $dsn[1] ?? ''; + $dsn = new DSN($dsn); + $this->connection = new Queue\Connection\Redis($dsn->getHost(), $dsn->getPort()); + $this->client = new Client(self::QUEUE_NAME, $this->connection); + } + + public function tearDown(): void + { + } + + public function testSamePayload(): void + { + $inToQueue = [ + 'key_1' => 'value_1', + 'key_2' => 'value_2', + ]; + + $result = $this->client->enqueue($inToQueue); + $this->assertTrue($result); + $outFromQueue = $this->connection->leftPopArray('utopia-queue.queue.' . self::QUEUE_NAME, 0)['payload']; + $this->assertNotEmpty($outFromQueue); + $this->assertSame($inToQueue, $outFromQueue); + } } From a0554ca91eb2cb4189187fca839cc087f624b067 Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 15 Jan 2023 12:25:03 +0200 Subject: [PATCH 49/94] usage test --- app/controllers/api/functions.php | 1 - tests/e2e/Services/Storage/StorageConsoleClientTest.php | 1 - tests/e2e/Services/Users/UsersConsoleClientTest.php | 1 - tests/unit/Usage/StatsTest.php | 8 +------- 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 88fe535b2..2e734fbb6 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1009,7 +1009,6 @@ App::post('/v1/functions/:functionId/executions') ->addMetric('executions.compute', (int)($executionResponse['duration'] * 1000))// per project ->addMetric("{$function->getInternalId()}" . ".executions.compute", (int)($executionResponse['duration'] * 1000))// per function ; - } catch (\Throwable $th) { $interval = (new \DateTime())->diff(new \DateTime($execution->getCreatedAt())); $execution diff --git a/tests/e2e/Services/Storage/StorageConsoleClientTest.php b/tests/e2e/Services/Storage/StorageConsoleClientTest.php index de059b180..e24ac524a 100644 --- a/tests/e2e/Services/Storage/StorageConsoleClientTest.php +++ b/tests/e2e/Services/Storage/StorageConsoleClientTest.php @@ -44,7 +44,6 @@ class StorageConsoleClientTest extends Scope $this->assertIsArray($response['body']['bucketsCount']); $this->assertIsArray($response['body']['filesCount']); $this->assertIsArray($response['body']['filesStorage']); - } public function testGetStorageBucketUsage() diff --git a/tests/e2e/Services/Users/UsersConsoleClientTest.php b/tests/e2e/Services/Users/UsersConsoleClientTest.php index 6bb889072..616a2ca38 100644 --- a/tests/e2e/Services/Users/UsersConsoleClientTest.php +++ b/tests/e2e/Services/Users/UsersConsoleClientTest.php @@ -42,6 +42,5 @@ class UsersConsoleClientTest extends Scope $this->assertEquals($response['body']['range'], '24h'); $this->assertIsArray($response['body']['usersCount']); $this->assertIsArray($response['body']['sessionsCount']); - } } diff --git a/tests/unit/Usage/StatsTest.php b/tests/unit/Usage/StatsTest.php index c728a5773..0c9914f4b 100644 --- a/tests/unit/Usage/StatsTest.php +++ b/tests/unit/Usage/StatsTest.php @@ -12,16 +12,10 @@ use Utopia\Queue\Connection; class StatsTest extends TestCase { - /** - * @var Connection - */ protected ?Connection $connection = null; - /** - * @var Client - */ protected ?Client $client = null; - const QUEUE_NAME = 'usage-test-q'; + protected const QUEUE_NAME = 'usage-test-q'; public function setUp(): void { From 5ab955c2ba3c348d21228c631b56829634f74ab2 Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 15 Jan 2023 14:02:53 +0200 Subject: [PATCH 50/94] usage test --- tests/e2e/Services/Realtime/RealtimeCustomClientTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index 7f09cb570..f4b959274 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -1248,7 +1248,7 @@ class RealtimeCustomClientTest extends Scope $this->assertNotEmpty($deployment['body']['$id']); // Wait for deployment to be built. - sleep(5); + sleep(10); $response = $this->client->call(Client::METHOD_PATCH, '/functions/' . $functionId . '/deployments/' . $deploymentId, array_merge([ 'content-type' => 'application/json', From b85cbc81bfa436001760a39c27cff7e5451658d4 Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 15 Jan 2023 14:05:35 +0200 Subject: [PATCH 51/94] usage test --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cff75b73b..77cbc932b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,7 +32,7 @@ jobs: docker pull composer:2.0 docker compose build appwrite docker compose up -d - sleep 30 + sleep 40 - name: Doctor run: docker compose exec -T appwrite doctor From b54c75cb285be819d98bbcb285409f6793e103ed Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 15 Jan 2023 14:22:00 +0200 Subject: [PATCH 52/94] usage test --- .github/workflows/tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 77cbc932b..9103c985b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,8 +32,9 @@ jobs: docker pull composer:2.0 docker compose build appwrite docker compose up -d - sleep 40 - + sleep 30 + docker logs appwrite + - name: Doctor run: docker compose exec -T appwrite doctor From 623be30619b1c57c351112a73f4ca27d1d41395c Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 15 Jan 2023 14:53:54 +0200 Subject: [PATCH 53/94] usage test --- composer.lock | 104 +++++++++++++++----------------------------------- 1 file changed, 30 insertions(+), 74 deletions(-) diff --git a/composer.lock b/composer.lock index 651bf42d8..2b1fcb96e 100644 --- a/composer.lock +++ b/composer.lock @@ -2577,30 +2577,30 @@ }, { "name": "doctrine/annotations", - "version": "1.14.2", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b" + "reference": "d02c9f3742044e17d5fa8d28d8402a2d95c33302" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/ad785217c1e9555a7d6c6c8c9f406395a5e2882b", - "reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/d02c9f3742044e17d5fa8d28d8402a2d95c33302", + "reference": "d02c9f3742044e17d5fa8d28d8402a2d95c33302", "shasum": "" }, "require": { - "doctrine/lexer": "^1 || ^2", + "doctrine/lexer": "^2 || ^3", "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", + "php": "^7.2 || ^8.0", "psr/cache": "^1 || ^2 || ^3" }, "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "~1.4.10 || ^1.8.0", + "doctrine/cache": "^2.0", + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.8.0", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^4.4 || ^5.4 || ^6", + "symfony/cache": "^5.4 || ^6", "vimeo/psalm": "^4.10" }, "suggest": { @@ -2647,52 +2647,9 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.14.2" + "source": "https://github.com/doctrine/annotations/tree/2.0.0" }, - "time": "2022-12-15T06:48:22+00:00" - }, - { - "name": "doctrine/deprecations", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", - "shasum": "" - }, - "require": { - "php": "^7.1|^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "phpunit/phpunit": "^7.5|^8.5|^9.5", - "psr/log": "^1|^2|^3" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", - "support": { - "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.0.0" - }, - "time": "2022-05-02T15:47:09+00:00" + "time": "2022-12-19T18:17:20+00:00" }, { "name": "doctrine/instantiator", @@ -2766,28 +2723,27 @@ }, { "name": "doctrine/lexer", - "version": "2.1.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" + "reference": "84a527db05647743d50373e0ec53a152f2cde568" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/84a527db05647743d50373e0ec53a152f2cde568", + "reference": "84a527db05647743d50373e0ec53a152f2cde568", "shasum": "" }, "require": { - "doctrine/deprecations": "^1.0", - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.9", + "phpunit/phpunit": "^9.5", "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^4.11 || ^5.0" + "vimeo/psalm": "^5.0" }, "type": "library", "autoload": { @@ -2824,7 +2780,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/2.1.0" + "source": "https://github.com/doctrine/lexer/tree/3.0.0" }, "funding": [ { @@ -2840,7 +2796,7 @@ "type": "tidelift" } ], - "time": "2022-12-14T08:49:07+00:00" + "time": "2022-12-15T16:57:16+00:00" }, { "name": "matthiasmullie/minify", @@ -3296,20 +3252,20 @@ }, { "name": "phpbench/phpbench", - "version": "1.2.7", + "version": "1.2.8", "source": { "type": "git", "url": "https://github.com/phpbench/phpbench.git", - "reference": "dce145304abbb16c8d9af69c19d96f47e9d0e670" + "reference": "3f7b3c200f86727de7a14bde94adb68a88e1bafc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpbench/phpbench/zipball/dce145304abbb16c8d9af69c19d96f47e9d0e670", - "reference": "dce145304abbb16c8d9af69c19d96f47e9d0e670", + "url": "https://api.github.com/repos/phpbench/phpbench/zipball/3f7b3c200f86727de7a14bde94adb68a88e1bafc", + "reference": "3f7b3c200f86727de7a14bde94adb68a88e1bafc", "shasum": "" }, "require": { - "doctrine/annotations": "^1.13", + "doctrine/annotations": "^1.13 || ^2.0", "ext-dom": "*", "ext-json": "*", "ext-pcre": "*", @@ -3374,7 +3330,7 @@ "description": "PHP Benchmarking Framework", "support": { "issues": "https://github.com/phpbench/phpbench/issues", - "source": "https://github.com/phpbench/phpbench/tree/1.2.7" + "source": "https://github.com/phpbench/phpbench/tree/1.2.8" }, "funding": [ { @@ -3382,7 +3338,7 @@ "type": "github" } ], - "time": "2022-10-15T09:57:51+00:00" + "time": "2023-01-14T13:08:42+00:00" }, { "name": "phpdocumentor/reflection-common", From 88cef643f04f42ac9bf838914b93e350eda2edf7 Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 15 Jan 2023 15:45:29 +0200 Subject: [PATCH 54/94] usage test --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c95232d2b..cfa908179 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/cache": "0.8.*", "utopia-php/cli": "0.14.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "dev-increment as 0.28.0", + "utopia-php/database": "0.28.*", "utopia-php/queue": "0.5.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.3.*", From f12b907aeb1965ef0f3be5194132e04579596d69 Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 15 Jan 2023 17:18:06 +0200 Subject: [PATCH 55/94] usage test --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index cfa908179..c95232d2b 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/cache": "0.8.*", "utopia-php/cli": "0.14.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.28.*", + "utopia-php/database": "dev-increment as 0.28.0", "utopia-php/queue": "0.5.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.3.*", From 68f7756601ce40093737ebe8ffd987e91272e2b5 Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 16 Jan 2023 10:55:51 +0200 Subject: [PATCH 56/94] usage test --- docker-compose.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 99ba679d6..9be6ff5d8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -93,8 +93,6 @@ services: - ./public:/usr/src/code/public - ./src:/usr/src/code/src - ./dev:/usr/local/dev - - ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database - - ./vendor/utopia-php/storage:/usr/src/code/vendor/utopia-php/storage depends_on: - mariadb - redis From be65f89effccd97ad075a629fa96ad717e07f01d Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 16 Jan 2023 11:38:52 +0200 Subject: [PATCH 57/94] usage test --- .github/workflows/tests.yml | 1 - app/controllers/shared/api.php | 23 ++++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9103c985b..b8d167431 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -33,7 +33,6 @@ jobs: docker compose build appwrite docker compose up -d sleep 30 - docker logs appwrite - name: Doctor run: docker compose exec -T appwrite doctor diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 00fe567d7..54f347f4a 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -513,22 +513,23 @@ App::shutdown() } } - if ( - $project->getId() !== 'console' - && $mode !== APP_MODE_ADMIN - ) { - $fileSize = 0; - $file = $request->getFiles('file'); + if ($project->getId() !== 'console') { + if ($mode !== APP_MODE_ADMIN) { + $fileSize = 0; + $file = $request->getFiles('file'); - if (!empty($file)) { - $fileSize = (\is_array($file['size']) && isset($file['size'][0])) ? $file['size'][0] : $file['size']; + if (!empty($file)) { + $fileSize = (\is_array($file['size']) && isset($file['size'][0])) ? $file['size'][0] : $file['size']; + } + + $queueForUsage + ->addMetric('network.requests', 1) + ->addMetric("network.inbound", $request->getSize() + $fileSize) + ->addMetric("network.outbound", $response->getSize()); } $queueForUsage ->setProject($project) - ->addMetric('network.requests', 1) - ->addMetric("network.inbound", $request->getSize() + $fileSize) - ->addMetric("network.outbound", $response->getSize()) ->trigger(); } }); From e278732481e2bafdfb053f30065fe9149ef48a14 Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 31 Jan 2023 16:50:52 +0200 Subject: [PATCH 58/94] removed some unnecessary files --- Dockerfile | 1 - app/console | 2 +- app/executor.php | 802 -- bin/benchmark | 3 - bin/executor | 3 - composer.json | 9 +- composer.lock | 6489 ----------------- phpbench.json | 17 - tests/benchmarks/Scopes/Scope.php | 14 - tests/benchmarks/Services/Databases/Base.php | 151 - .../Databases/DatabasesCustomClientBench.php | 10 - .../Databases/DatabasesCustomServerBench.php | 10 - tests/benchmarks/Services/Functions/Base.php | 113 - .../Functions/FunctionsCustomClientBench.php | 10 - .../Functions/FunctionsCustomServerBench.php | 21 - tests/benchmarks/Services/Storage/Base.php | 117 - .../Storage/StorageCustomClientBench.php | 10 - .../Storage/StorageCustomServerBench.php | 10 - .../Services/Users/UserCustomServerBench.php | 94 - tests/benchmarks/http.js | 34 + tests/benchmarks/ws.js | 59 + 21 files changed, 95 insertions(+), 7884 deletions(-) delete mode 100644 app/executor.php delete mode 100644 bin/benchmark delete mode 100644 bin/executor delete mode 100644 composer.lock delete mode 100644 phpbench.json delete mode 100644 tests/benchmarks/Scopes/Scope.php delete mode 100644 tests/benchmarks/Services/Databases/Base.php delete mode 100644 tests/benchmarks/Services/Databases/DatabasesCustomClientBench.php delete mode 100644 tests/benchmarks/Services/Databases/DatabasesCustomServerBench.php delete mode 100644 tests/benchmarks/Services/Functions/Base.php delete mode 100644 tests/benchmarks/Services/Functions/FunctionsCustomClientBench.php delete mode 100644 tests/benchmarks/Services/Functions/FunctionsCustomServerBench.php delete mode 100644 tests/benchmarks/Services/Storage/Base.php delete mode 100644 tests/benchmarks/Services/Storage/StorageCustomClientBench.php delete mode 100644 tests/benchmarks/Services/Storage/StorageCustomServerBench.php delete mode 100644 tests/benchmarks/Services/Users/UserCustomServerBench.php create mode 100644 tests/benchmarks/http.js create mode 100644 tests/benchmarks/ws.js diff --git a/Dockerfile b/Dockerfile index 15c7b1552..0afb3b30b 100755 --- a/Dockerfile +++ b/Dockerfile @@ -305,7 +305,6 @@ RUN chmod +x /usr/local/bin/doctor && \ chmod +x /usr/local/bin/install && \ chmod +x /usr/local/bin/migrate && \ chmod +x /usr/local/bin/realtime && \ - chmod +x /usr/local/bin/executor && \ chmod +x /usr/local/bin/schedule && \ chmod +x /usr/local/bin/sdks && \ chmod +x /usr/local/bin/specs && \ diff --git a/app/console b/app/console index af3d741ae..184ffdc02 160000 --- a/app/console +++ b/app/console @@ -1 +1 @@ -Subproject commit af3d741ae8f02c2e16b8b4ea4664a3f8970290fd +Subproject commit 184ffdc0225afa33772a71ab25dfaef2ad8b386e diff --git a/app/executor.php b/app/executor.php deleted file mode 100644 index fba8c4c41..000000000 --- a/app/executor.php +++ /dev/null @@ -1,802 +0,0 @@ -column('id', Swoole\Table::TYPE_STRING, 256); -$activeRuntimes->column('created', Swoole\Table::TYPE_INT, 8); -$activeRuntimes->column('updated', Swoole\Table::TYPE_INT, 8); -$activeRuntimes->column('name', Swoole\Table::TYPE_STRING, 128); -$activeRuntimes->column('status', Swoole\Table::TYPE_STRING, 128); -$activeRuntimes->column('key', Swoole\Table::TYPE_STRING, 256); -$activeRuntimes->create(); - -/** - * Create orchestration pool - */ -$orchestrationPool = new ConnectionPool(function () { - $dockerUser = App::getEnv('DOCKERHUB_PULL_USERNAME', null); - $dockerPass = App::getEnv('DOCKERHUB_PULL_PASSWORD', null); - $orchestration = new Orchestration(new DockerCLI($dockerUser, $dockerPass)); - return $orchestration; -}, 10); - - -/** - * Create logger instance - */ -$providerName = App::getEnv('_APP_LOGGING_PROVIDER', ''); -$providerConfig = App::getEnv('_APP_LOGGING_CONFIG', ''); -$logger = null; - -if (!empty($providerName) && !empty($providerConfig) && Logger::hasProvider($providerName)) { - $classname = '\\Utopia\\Logger\\Adapter\\' . \ucfirst($providerName); - $adapter = new $classname($providerConfig); - $logger = new Logger($adapter); -} - -function logError(Throwable $error, string $action, Utopia\Route $route = null) -{ - global $logger; - - if ($logger) { - $version = App::getEnv('_APP_VERSION', 'UNKNOWN'); - - $log = new Log(); - $log->setNamespace("executor"); - $log->setServer(\gethostname()); - $log->setVersion($version); - $log->setType(Log::TYPE_ERROR); - $log->setMessage($error->getMessage()); - - if ($route) { - $log->addTag('method', $route->getMethod()); - $log->addTag('url', $route->getPath()); - } - - $log->addTag('code', $error->getCode()); - $log->addTag('verboseType', get_class($error)); - - $log->addExtra('file', $error->getFile()); - $log->addExtra('line', $error->getLine()); - $log->addExtra('trace', $error->getTraceAsString()); - $log->addExtra('detailedTrace', $error->getTrace()); - - $log->setAction($action); - - $isProduction = App::getEnv('_APP_ENV', 'development') === 'production'; - $log->setEnvironment($isProduction ? Log::ENVIRONMENT_PRODUCTION : Log::ENVIRONMENT_STAGING); - - $responseCode = $logger->addLog($log); - Console::info('Executor log pushed with status code: ' . $responseCode); - } - - Console::error('[Error] Type: ' . get_class($error)); - Console::error('[Error] Message: ' . $error->getMessage()); - Console::error('[Error] File: ' . $error->getFile()); - Console::error('[Error] Line: ' . $error->getLine()); -} - -function getStorageDevice($root): Device -{ - switch (App::getEnv('_APP_STORAGE_DEVICE', Storage::DEVICE_LOCAL)) { - case Storage::DEVICE_LOCAL: - default: - return new Local($root); - case Storage::DEVICE_S3: - $s3AccessKey = App::getEnv('_APP_STORAGE_S3_ACCESS_KEY', ''); - $s3SecretKey = App::getEnv('_APP_STORAGE_S3_SECRET', ''); - $s3Region = App::getEnv('_APP_STORAGE_S3_REGION', ''); - $s3Bucket = App::getEnv('_APP_STORAGE_S3_BUCKET', ''); - $s3Acl = 'private'; - return new S3($root, $s3AccessKey, $s3SecretKey, $s3Bucket, $s3Region, $s3Acl); - case Storage::DEVICE_DO_SPACES: - $doSpacesAccessKey = App::getEnv('_APP_STORAGE_DO_SPACES_ACCESS_KEY', ''); - $doSpacesSecretKey = App::getEnv('_APP_STORAGE_DO_SPACES_SECRET', ''); - $doSpacesRegion = App::getEnv('_APP_STORAGE_DO_SPACES_REGION', ''); - $doSpacesBucket = App::getEnv('_APP_STORAGE_DO_SPACES_BUCKET', ''); - $doSpacesAcl = 'private'; - return new DOSpaces($root, $doSpacesAccessKey, $doSpacesSecretKey, $doSpacesBucket, $doSpacesRegion, $doSpacesAcl); - case Storage::DEVICE_BACKBLAZE: - $backblazeAccessKey = App::getEnv('_APP_STORAGE_BACKBLAZE_ACCESS_KEY', ''); - $backblazeSecretKey = App::getEnv('_APP_STORAGE_BACKBLAZE_SECRET', ''); - $backblazeRegion = App::getEnv('_APP_STORAGE_BACKBLAZE_REGION', ''); - $backblazeBucket = App::getEnv('_APP_STORAGE_BACKBLAZE_BUCKET', ''); - $backblazeAcl = 'private'; - return new Backblaze($root, $backblazeAccessKey, $backblazeSecretKey, $backblazeBucket, $backblazeRegion, $backblazeAcl); - case Storage::DEVICE_LINODE: - $linodeAccessKey = App::getEnv('_APP_STORAGE_LINODE_ACCESS_KEY', ''); - $linodeSecretKey = App::getEnv('_APP_STORAGE_LINODE_SECRET', ''); - $linodeRegion = App::getEnv('_APP_STORAGE_LINODE_REGION', ''); - $linodeBucket = App::getEnv('_APP_STORAGE_LINODE_BUCKET', ''); - $linodeAcl = 'private'; - return new Linode($root, $linodeAccessKey, $linodeSecretKey, $linodeBucket, $linodeRegion, $linodeAcl); - case Storage::DEVICE_WASABI: - $wasabiAccessKey = App::getEnv('_APP_STORAGE_WASABI_ACCESS_KEY', ''); - $wasabiSecretKey = App::getEnv('_APP_STORAGE_WASABI_SECRET', ''); - $wasabiRegion = App::getEnv('_APP_STORAGE_WASABI_REGION', ''); - $wasabiBucket = App::getEnv('_APP_STORAGE_WASABI_BUCKET', ''); - $wasabiAcl = 'private'; - return new Wasabi($root, $wasabiAccessKey, $wasabiSecretKey, $wasabiBucket, $wasabiRegion, $wasabiAcl); - } -} - -App::post('/v1/runtimes') - ->desc("Create a new runtime server") - ->param('runtimeId', '', new Text(64), 'Unique runtime ID.') - ->param('source', '', new Text(0), 'Path to source files.') - ->param('destination', '', new Text(0), 'Destination folder to store build files into.', true) - ->param('vars', [], new Assoc(), 'Environment Variables required for the build.') - ->param('commands', [], new ArrayList(new Text(1024), 100), 'Commands required to build the container. Maximum of 100 commands are allowed, each 1024 characters long.') - ->param('runtime', '', new Text(128), 'Runtime for the cloud function.') - ->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.') - ->param('workdir', '', new Text(256), 'Working directory.', true) - ->inject('orchestrationPool') - ->inject('activeRuntimes') - ->inject('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)) { - if ($activeRuntimes->get($runtimeId)['status'] == 'pending') { - throw new \Exception('A runtime with the same ID is already being created. Attempt a execution soon.', 500); - } - - throw new Exception('Runtime already exists.', 409); - } - - $container = []; - $containerId = ''; - $stdout = ''; - $stderr = ''; - $startTime = DateTime::now(); - $startTimeUnix = (new \DateTime($startTime))->getTimestamp(); - $endTimeUnix = 0; - $orchestration = $orchestrationPool->get(); - - $secret = \bin2hex(\random_bytes(16)); - - if (!$remove) { - $activeRuntimes->set($runtimeId, [ - 'id' => $containerId, - 'name' => $runtimeId, - 'created' => $startTimeUnix, - 'updated' => $endTimeUnix, - 'status' => 'pending', - 'key' => $secret, - ]); - } - - try { - Console::info('Building container : ' . $runtimeId); - - /** - * Temporary file paths in the executor - */ - $tmpSource = "/tmp/$runtimeId/src/code.tar.gz"; - $tmpBuild = "/tmp/$runtimeId/builds/code.tar.gz"; - - /** - * Copy code files from source to a temporary location on the executor - */ - $sourceDevice = getStorageDevice("/"); - $localDevice = new Local(); - $buffer = $sourceDevice->read($source); - if (!$localDevice->write($tmpSource, $buffer)) { - throw new Exception('Failed to copy source code to temporary directory', 500); - }; - - /** - * Create the mount folder - */ - if (!\file_exists(\dirname($tmpBuild))) { - if (!@\mkdir(\dirname($tmpBuild), 0755, true)) { - throw new Exception("Failed to create temporary directory", 500); - } - } - - /** - * Create container - */ - $vars = \array_merge($vars, [ - 'INTERNAL_RUNTIME_KEY' => $secret, - 'INTERNAL_RUNTIME_ENTRYPOINT' => $entrypoint, - ]); - $vars = array_map(fn ($v) => strval($v), $vars); - $orchestration - ->setCpus((int) App::getEnv('_APP_FUNCTIONS_CPUS', 0)) - ->setMemory((int) App::getEnv('_APP_FUNCTIONS_MEMORY', 0)) - ->setSwap((int) App::getEnv('_APP_FUNCTIONS_MEMORY_SWAP', 0)); - - /** Keep the container alive if we have commands to be executed */ - $entrypoint = !empty($commands) ? [ - 'tail', - '-f', - '/dev/null' - ] : []; - - $containerId = $orchestration->run( - image: $baseImage, - name: $runtimeId, - hostname: $runtimeId, - vars: $vars, - command: $entrypoint, - labels: [ - 'openruntimes-id' => $runtimeId, - 'openruntimes-type' => 'runtime', - 'openruntimes-created' => strval($startTimeUnix), - 'openruntimes-runtime' => $runtime, - ], - workdir: $workdir, - volumes: [ - \dirname($tmpSource) . ':/tmp:rw', - \dirname($tmpBuild) . ':/usr/code:rw' - ] - ); - - if (empty($containerId)) { - throw new Exception('Failed to create build container', 500); - } - - $orchestration->networkConnect($runtimeId, App::getEnv('OPEN_RUNTIMES_NETWORK', 'appwrite_runtimes')); - - /** - * Execute any commands if they were provided - */ - if (!empty($commands)) { - $status = $orchestration->execute( - name: $runtimeId, - command: $commands, - stdout: $stdout, - stderr: $stderr, - timeout: App::getEnv('_APP_FUNCTIONS_BUILD_TIMEOUT', 900) - ); - - if (!$status) { - throw new Exception('Failed to build dependenices ' . $stderr, 500); - } - } - - /** - * Move built code to expected build directory - */ - if (!empty($destination)) { - // Check if the build was successful by checking if file exists - if (!\file_exists($tmpBuild)) { - throw new Exception('Something went wrong during the build process', 500); - } - - $destinationDevice = getStorageDevice($destination); - $outputPath = $destinationDevice->getPath(\uniqid() . '.' . \pathinfo('code.tar.gz', PATHINFO_EXTENSION)); - - $buffer = $localDevice->read($tmpBuild); - if (!$destinationDevice->write($outputPath, $buffer, $localDevice->getFileMimeType($tmpBuild))) { - throw new Exception('Failed to move built code to storage', 500); - }; - - $container['outputPath'] = $outputPath; - } - - if (empty($stdout)) { - $stdout = 'Build Successful!'; - } - - $endTime = DateTime::now(); - $endTimeUnix = (new \DateTime($endTime))->getTimestamp(); - $duration = $endTimeUnix - $startTimeUnix; - - $container = array_merge($container, [ - 'status' => 'ready', - 'response' => \mb_strcut($stdout, 0, 1000000), // Limit to 1MB - 'stderr' => \mb_strcut($stderr, 0, 1000000), // Limit to 1MB - 'startTime' => $startTime, - 'endTime' => $endTime, - 'duration' => $duration, - ]); - - - if (!$remove) { - $activeRuntimes->set($runtimeId, [ - 'id' => $containerId, - 'name' => $runtimeId, - 'created' => $startTimeUnix, - 'updated' => $endTimeUnix, - 'status' => 'Up ' . \round($duration, 2) . 's', - 'key' => $secret, - ]); - } - - Console::success('Build Stage completed in ' . ($duration) . ' seconds'); - } catch (Throwable $th) { - Console::error('Build failed: ' . $th->getMessage() . $stdout); - - throw new Exception($th->getMessage() . $stdout, 500); - } finally { - // Container cleanup - if ($remove) { - if (!empty($containerId)) { - // If container properly created - $orchestration->remove($containerId, true); - $activeRuntimes->del($runtimeId); - } 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); - $activeRuntimes->del($runtimeId); - } 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); - } - - $response - ->setStatusCode(Response::STATUS_CODE_CREATED) - ->json($container); - }); - - -App::get('/v1/runtimes') - ->desc("List currently active runtimes") - ->inject('activeRuntimes') - ->inject('response') - ->action(function ($activeRuntimes, Response $response) { - $runtimes = []; - - foreach ($activeRuntimes as $runtime) { - $runtimes[] = $runtime; - } - - $response - ->setStatusCode(Response::STATUS_CODE_OK) - ->json($runtimes); - }); - -App::get('/v1/runtimes/:runtimeId') - ->desc("Get a runtime by its ID") - ->param('runtimeId', '', new Text(64), 'Runtime unique ID.') - ->inject('activeRuntimes') - ->inject('response') - ->action(function ($runtimeId, $activeRuntimes, Response $response) { - - if (!$activeRuntimes->exists($runtimeId)) { - throw new Exception('Runtime not found', 404); - } - - $runtime = $activeRuntimes->get($runtimeId); - - $response - ->setStatusCode(Response::STATUS_CODE_OK) - ->json($runtime); - }); - -App::delete('/v1/runtimes/:runtimeId') - ->desc('Delete a runtime') - ->param('runtimeId', '', new Text(64), 'Runtime unique ID.', false) - ->inject('orchestrationPool') - ->inject('activeRuntimes') - ->inject('response') - ->action(function (string $runtimeId, $orchestrationPool, $activeRuntimes, Response $response) { - - if (!$activeRuntimes->exists($runtimeId)) { - throw new Exception('Runtime not found', 404); - } - - Console::info('Deleting runtime: ' . $runtimeId); - - try { - $orchestration = $orchestrationPool->get(); - $orchestration->remove($runtimeId, true); - $activeRuntimes->del($runtimeId); - Console::success('Removed runtime container: ' . $runtimeId); - } finally { - $orchestrationPool->put($orchestration); - } - - // Remove all the build containers with that same ID - // TODO:: Delete build containers - // foreach ($buildIds as $buildId) { - // try { - // Console::info('Deleting build container : ' . $buildId); - // $status = $orchestration->remove('build-' . $buildId, true); - // } catch (Throwable $th) { - // Console::error($th->getMessage()); - // } - // } - - $response - ->setStatusCode(Response::STATUS_CODE_OK) - ->send(); - }); - - -App::post('/v1/execution') - ->desc('Create an execution') - ->param('runtimeId', '', new Text(64), 'The runtimeID to execute.') - ->param('vars', [], new Assoc(), 'Environment variables required for the build.') - ->param('data', '', new Text(8192), 'Data to be forwarded to the function, this is user specified.', true) - ->param('timeout', 15, new Range(1, (int) App::getEnv('_APP_FUNCTIONS_TIMEOUT', 900)), 'Function maximum execution time in seconds.') - ->inject('activeRuntimes') - ->inject('response') - ->action( - function (string $runtimeId, array $vars, string $data, $timeout, $activeRuntimes, Response $response) { - if (!$activeRuntimes->exists($runtimeId)) { - throw new Exception('Runtime not found. Please create the runtime.', 404); - } - - for ($i = 0; $i < 5; $i++) { - if ($activeRuntimes->get($runtimeId)['status'] === 'pending') { - Console::info('Waiting for runtime to be ready...'); - sleep(1); - } else { - break; - } - - if ($i === 4) { - throw new Exception('Runtime failed to launch in allocated time.', 500); - } - } - - $runtime = $activeRuntimes->get($runtimeId); - $secret = $runtime['key']; - if (empty($secret)) { - throw new Exception('Runtime secret not found. Please re-create the runtime.', 500); - } - - Console::info('Executing Runtime: ' . $runtimeId); - - $execution = []; - $executionStart = \microtime(true); - $stdout = ''; - $stderr = ''; - $res = ''; - $statusCode = 0; - $errNo = -1; - $executorResponse = ''; - - $timeout ??= (int) App::getEnv('_APP_FUNCTIONS_TIMEOUT', 900); - - $ch = \curl_init(); - $body = \json_encode([ - 'variables' => $vars, - 'payload' => $data, - 'timeout' => $timeout - ]); - \curl_setopt($ch, CURLOPT_URL, "http://" . $runtimeId . ":3000/"); - \curl_setopt($ch, CURLOPT_POST, true); - \curl_setopt($ch, CURLOPT_POSTFIELDS, $body); - \curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - \curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); - \curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); - - \curl_setopt($ch, CURLOPT_HTTPHEADER, [ - 'Content-Type: application/json', - 'Content-Length: ' . \strlen($body), - 'x-internal-challenge: ' . $secret, - 'host: null' - ]); - - $executorResponse = \curl_exec($ch); - $executorResponse = json_decode($executorResponse, true); - - $statusCode = \curl_getinfo($ch, CURLINFO_HTTP_CODE); - - $error = \curl_error($ch); - - $errNo = \curl_errno($ch); - - \curl_close($ch); - - switch (true) { - /** No Error. */ - case $errNo === 0: - break; - /** Runtime not ready for requests yet. 111 is the swoole error code for Connection Refused - see https://openswoole.com/docs/swoole-error-code */ - case $errNo === 111: - throw new Exception('An internal curl error has occurred within the executor! Error Msg: ' . $error, 406); - /** Any other CURL error */ - default: - throw new Exception('An internal curl error has occurred within the executor! Error Msg: ' . $error, 500); - } - - switch (true) { - case $statusCode >= 500: - $stderr = ($executorResponse ?? [])['stderr'] ?? 'Internal Runtime error.'; - $stdout = ($executorResponse ?? [])['stdout'] ?? 'Internal Runtime error.'; - break; - case $statusCode >= 100: - $stdout = $executorResponse['stdout']; - $res = $executorResponse['response']; - if (is_array($res)) { - $res = json_encode($res, JSON_UNESCAPED_UNICODE); - } - break; - default: - $stderr = ($executorResponse ?? [])['stderr'] ?? 'Execution failed.'; - $stdout = ($executorResponse ?? [])['stdout'] ?? ''; - break; - } - - $executionEnd = \microtime(true); - $executionTime = ($executionEnd - $executionStart); - $functionStatus = ($statusCode >= 500) ? 'failed' : 'completed'; - - Console::success('Function executed in ' . $executionTime . ' seconds, status: ' . $functionStatus); - - $execution = [ - 'status' => $functionStatus, - 'statusCode' => $statusCode, - 'response' => \mb_strcut($res, 0, 1000000), // Limit to 1MB - 'stdout' => \mb_strcut($stdout, 0, 1000000), // Limit to 1MB - 'stderr' => \mb_strcut($stderr, 0, 1000000), // Limit to 1MB - 'duration' => $executionTime, - ]; - - /** Update swoole table */ - $runtime['updated'] = \time(); - $activeRuntimes->set($runtimeId, $runtime); - - $response - ->setStatusCode(Response::STATUS_CODE_OK) - ->json($execution); - } - ); - -App::setMode(App::MODE_TYPE_PRODUCTION); // Define Mode - -$http = new Server("0.0.0.0", 80); - -/** Set Resources */ -App::setResource('orchestrationPool', fn() => $orchestrationPool); -App::setResource('activeRuntimes', fn() => $activeRuntimes); - -/** Set callbacks */ -App::error() - ->inject('utopia') - ->inject('error') - ->inject('request') - ->inject('response') - ->action(function (App $utopia, throwable $error, Request $request, Response $response) { - $route = $utopia->match($request); - logError($error, "httpError", $route); - - switch ($error->getCode()) { - case 400: // Error allowed publicly - case 401: // Error allowed publicly - case 402: // Error allowed publicly - case 403: // Error allowed publicly - case 404: // Error allowed publicly - case 406: // Error allowed publicly - case 409: // Error allowed publicly - case 412: // Error allowed publicly - case 425: // Error allowed publicly - case 429: // Error allowed publicly - case 501: // Error allowed publicly - case 503: // Error allowed publicly - $code = $error->getCode(); - break; - default: - $code = 500; // All other errors get the generic 500 server error status code - } - - $output = [ - 'message' => $error->getMessage(), - 'code' => $error->getCode(), - 'file' => $error->getFile(), - 'line' => $error->getLine(), - 'trace' => $error->getTrace(), - 'version' => App::getEnv('_APP_VERSION', 'UNKNOWN') - ]; - - $response - ->addHeader('Cache-Control', 'no-cache, no-store, must-revalidate') - ->addHeader('Expires', '0') - ->addHeader('Pragma', 'no-cache') - ->setStatusCode($code); - - $response->json($output); - }); - -App::init() - ->inject('request') - ->action(function (Request $request) { - $secretKey = $request->getHeader('x-appwrite-executor-key', ''); - if (empty($secretKey)) { - throw new Exception('Missing executor key', 401); - } - - if ($secretKey !== App::getEnv('_APP_EXECUTOR_SECRET', '')) { - throw new Exception('Missing executor key', 401); - } - }); - - -$http->on('start', function ($http) { - global $orchestrationPool; - global $activeRuntimes; - - /** - * Warmup: make sure images are ready to run fast 🚀 - */ - $runtimes = new Runtimes('v2'); - $allowList = empty(App::getEnv('_APP_FUNCTIONS_RUNTIMES')) ? [] : \explode(',', App::getEnv('_APP_FUNCTIONS_RUNTIMES')); - $runtimes = $runtimes->getAll(true, $allowList); - foreach ($runtimes as $runtime) { - go(function () use ($runtime, $orchestrationPool) { - try { - $orchestration = $orchestrationPool->get(); - Console::info('Warming up ' . $runtime['name'] . ' ' . $runtime['version'] . ' environment...'); - $response = $orchestration->pull($runtime['image']); - if ($response) { - Console::success("Successfully Warmed up {$runtime['name']} {$runtime['version']}!"); - } else { - Console::warning("Failed to Warmup {$runtime['name']} {$runtime['version']}!"); - } - } catch (\Throwable $th) { - } finally { - $orchestrationPool->put($orchestration); - } - }); - } - - /** - * Remove residual runtimes - */ - Console::info('Removing orphan runtimes...'); - try { - $orchestration = $orchestrationPool->get(); - $orphans = $orchestration->list(['label' => 'openruntimes-type=runtime']); - } finally { - $orchestrationPool->put($orchestration); - } - - foreach ($orphans as $runtime) { - go(function () use ($runtime, $orchestrationPool) { - try { - $orchestration = $orchestrationPool->get(); - $orchestration->remove($runtime->getName(), true); - Console::success("Successfully removed {$runtime->getName()}"); - } catch (\Throwable $th) { - Console::error('Orphan runtime deletion failed: ' . $th->getMessage()); - } finally { - $orchestrationPool->put($orchestration); - } - }); - } - - /** - * Register handlers for shutdown - */ - @Process::signal(SIGINT, function () use ($http) { - $http->shutdown(); - }); - - @Process::signal(SIGQUIT, function () use ($http) { - $http->shutdown(); - }); - - @Process::signal(SIGKILL, function () use ($http) { - $http->shutdown(); - }); - - @Process::signal(SIGTERM, function () use ($http) { - $http->shutdown(); - }); - - /** - * Run a maintenance worker every MAINTENANCE_INTERVAL seconds to remove inactive runtimes - */ - Timer::tick(MAINTENANCE_INTERVAL * 1000, function () use ($orchestrationPool, $activeRuntimes) { - Console::warning("Running maintenance task ..."); - foreach ($activeRuntimes as $runtime) { - $inactiveThreshold = \time() - App::getEnv('_APP_FUNCTIONS_INACTIVE_THRESHOLD', 60); - if ($runtime['updated'] < $inactiveThreshold) { - go(function () use ($runtime, $orchestrationPool, $activeRuntimes) { - try { - $orchestration = $orchestrationPool->get(); - $orchestration->remove($runtime['name'], true); - $activeRuntimes->del($runtime['name']); - Console::success("Successfully removed {$runtime['name']}"); - } catch (\Throwable $th) { - Console::error('Inactive Runtime deletion failed: ' . $th->getMessage()); - } finally { - $orchestrationPool->put($orchestration); - } - }); - } - } - }); -}); - - -$http->on('beforeShutdown', function () { - global $orchestrationPool; - Console::info('Cleaning up containers before shutdown...'); - - $orchestration = $orchestrationPool->get(); - $functionsToRemove = $orchestration->list(['label' => 'openruntimes-type=runtime']); - $orchestrationPool->put($orchestration); - - foreach ($functionsToRemove as $container) { - go(function () use ($orchestrationPool, $container) { - try { - $orchestration = $orchestrationPool->get(); - $orchestration->remove($container->getId(), true); - Console::info('Removed container ' . $container->getName()); - } catch (\Throwable $th) { - Console::error('Failed to remove container: ' . $container->getName()); - } finally { - $orchestrationPool->put($orchestration); - } - }); - } -}); - - -$http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swooleResponse) { - $request = new Request($swooleRequest); - $response = new Response($swooleResponse); - $app = new App('UTC'); - - try { - $app->run($request, $response); - } catch (\Throwable $th) { - logError($th, "serverError"); - $swooleResponse->setStatusCode(500); - $output = [ - 'message' => 'Error: ' . $th->getMessage(), - 'code' => 500, - 'file' => $th->getFile(), - 'line' => $th->getLine(), - 'trace' => $th->getTrace() - ]; - $swooleResponse->end(\json_encode($output)); - } -}); - -$http->start(); diff --git a/bin/benchmark b/bin/benchmark deleted file mode 100644 index de9bee100..000000000 --- a/bin/benchmark +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - -/usr/src/code/vendor/bin/phpbench run --config /usr/src/code/phpbench.json --report appwrite $@ \ No newline at end of file diff --git a/bin/executor b/bin/executor deleted file mode 100644 index f08bd68e4..000000000 --- a/bin/executor +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -php -e /usr/src/code/app/executor.php -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php \ No newline at end of file diff --git a/composer.json b/composer.json index c95232d2b..dec429fb0 100644 --- a/composer.json +++ b/composer.json @@ -99,14 +99,7 @@ "phpunit/phpunit": "9.5.20", "squizlabs/php_codesniffer": "^3.6", "swoole/ide-helper": "4.8.9", - "textalk/websocket": "1.5.7", - "phpbench/phpbench": "^1.2", - - "symfony/console": "^5.0", - "symfony/filesystem": "^5.0", - "symfony/finder": "^5.0", - "symfony/options-resolver": "^5.0", - "symfony/process": "^5.0" + "textalk/websocket": "1.5.7" }, "provide": { "ext-phpiredis": "*" diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 2b1fcb96e..000000000 --- a/composer.lock +++ /dev/null @@ -1,6489 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "a38abc1452cd5f641e1cabfeeb41b524", - "packages": [ - { - "name": "adhocore/jwt", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/adhocore/php-jwt.git", - "reference": "6c434af7170090bb7a8880d2bc220a2254ba7899" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/adhocore/php-jwt/zipball/6c434af7170090bb7a8880d2bc220a2254ba7899", - "reference": "6c434af7170090bb7a8880d2bc220a2254ba7899", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.5 || ^7.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Ahc\\Jwt\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jitendra Adhikari", - "email": "jiten.adhikary@gmail.com" - } - ], - "description": "Ultra lightweight JSON web token (JWT) library for PHP5.5+.", - "keywords": [ - "auth", - "json-web-token", - "jwt", - "jwt-auth", - "jwt-php", - "token" - ], - "support": { - "issues": "https://github.com/adhocore/php-jwt/issues", - "source": "https://github.com/adhocore/php-jwt/tree/1.1.2" - }, - "funding": [ - { - "url": "https://paypal.me/ji10", - "type": "custom" - } - ], - "time": "2021-02-20T09:56:44+00:00" - }, - { - "name": "appwrite/php-clamav", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/appwrite/php-clamav.git", - "reference": "61d00f24f9e7766fbba233e7b8d09c5475388073" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/appwrite/php-clamav/zipball/61d00f24f9e7766fbba233e7b8d09c5475388073", - "reference": "61d00f24f9e7766fbba233e7b8d09c5475388073", - "shasum": "" - }, - "require": { - "ext-sockets": "*", - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Appwrite\\ClamAV\\": "src/ClamAV" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "ClamAV network and pipe client for PHP", - "keywords": [ - "anti virus", - "appwrite", - "clamav", - "php" - ], - "support": { - "issues": "https://github.com/appwrite/php-clamav/issues", - "source": "https://github.com/appwrite/php-clamav/tree/1.1.0" - }, - "time": "2020-10-02T05:23:46+00:00" - }, - { - "name": "appwrite/php-runtimes", - "version": "0.11.1", - "source": { - "type": "git", - "url": "https://github.com/appwrite/runtimes.git", - "reference": "9d74a477ba3333cbcfac565c46fcf19606b7b603" - }, - "require": { - "php": ">=8.0", - "utopia-php/system": "0.6.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Appwrite\\Runtimes\\": "src/Runtimes" - } - }, - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Torsten Dittmann", - "email": "torsten@appwrite.io" - } - ], - "description": "Appwrite repository for Cloud Function runtimes that contains the configurations and tests for all of the Appwrite runtime environments.", - "keywords": [ - "appwrite", - "php", - "runtimes" - ], - "time": "2022-11-07T16:45:52+00:00" - }, - { - "name": "chillerlan/php-qrcode", - "version": "4.3.3", - "source": { - "type": "git", - "url": "https://github.com/chillerlan/php-qrcode.git", - "reference": "6356b246948ac1025882b3f55e7c68ebd4515ae3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/6356b246948ac1025882b3f55e7c68ebd4515ae3", - "reference": "6356b246948ac1025882b3f55e7c68ebd4515ae3", - "shasum": "" - }, - "require": { - "chillerlan/php-settings-container": "^2.1", - "ext-mbstring": "*", - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "phan/phan": "^5.3", - "phpunit/phpunit": "^9.5", - "setasign/fpdf": "^1.8.2" - }, - "suggest": { - "chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.", - "setasign/fpdf": "Required to use the QR FPDF output." - }, - "type": "library", - "autoload": { - "psr-4": { - "chillerlan\\QRCode\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kazuhiko Arase", - "homepage": "https://github.com/kazuhikoarase" - }, - { - "name": "Smiley", - "email": "smiley@chillerlan.net", - "homepage": "https://github.com/codemasher" - }, - { - "name": "Contributors", - "homepage": "https://github.com/chillerlan/php-qrcode/graphs/contributors" - } - ], - "description": "A QR code generator. PHP 7.4+", - "homepage": "https://github.com/chillerlan/php-qrcode", - "keywords": [ - "phpqrcode", - "qr", - "qr code", - "qrcode", - "qrcode-generator" - ], - "support": { - "issues": "https://github.com/chillerlan/php-qrcode/issues", - "source": "https://github.com/chillerlan/php-qrcode/tree/4.3.3" - }, - "funding": [ - { - "url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", - "type": "custom" - }, - { - "url": "https://ko-fi.com/codemasher", - "type": "ko_fi" - } - ], - "time": "2021-11-25T22:38:09+00:00" - }, - { - "name": "chillerlan/php-settings-container", - "version": "2.1.4", - "source": { - "type": "git", - "url": "https://github.com/chillerlan/php-settings-container.git", - "reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/1beb7df3c14346d4344b0b2e12f6f9a74feabd4a", - "reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "phan/phan": "^5.3", - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "chillerlan\\Settings\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Smiley", - "email": "smiley@chillerlan.net", - "homepage": "https://github.com/codemasher" - } - ], - "description": "A container class for immutable settings objects. Not a DI container. PHP 7.4+", - "homepage": "https://github.com/chillerlan/php-settings-container", - "keywords": [ - "PHP7", - "Settings", - "configuration", - "container", - "helper" - ], - "support": { - "issues": "https://github.com/chillerlan/php-settings-container/issues", - "source": "https://github.com/chillerlan/php-settings-container" - }, - "funding": [ - { - "url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", - "type": "custom" - }, - { - "url": "https://ko-fi.com/codemasher", - "type": "ko_fi" - } - ], - "time": "2022-07-05T22:32:14+00:00" - }, - { - "name": "colinmollenhour/credis", - "version": "v1.14.0", - "source": { - "type": "git", - "url": "https://github.com/colinmollenhour/credis.git", - "reference": "dccc8a46586475075fbb012d8bd523b8a938c2dc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/dccc8a46586475075fbb012d8bd523b8a938c2dc", - "reference": "dccc8a46586475075fbb012d8bd523b8a938c2dc", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "suggest": { - "ext-redis": "Improved performance for communicating with redis" - }, - "type": "library", - "autoload": { - "classmap": [ - "Client.php", - "Cluster.php", - "Sentinel.php", - "Module.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Colin Mollenhour", - "email": "colin@mollenhour.com" - } - ], - "description": "Credis is a lightweight interface to the Redis key-value store which wraps the phpredis library when available for better performance.", - "homepage": "https://github.com/colinmollenhour/credis", - "support": { - "issues": "https://github.com/colinmollenhour/credis/issues", - "source": "https://github.com/colinmollenhour/credis/tree/v1.14.0" - }, - "time": "2022-11-09T01:18:39+00:00" - }, - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.5", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" - }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-01-17T14:14:24+00:00" - }, - { - "name": "dragonmantank/cron-expression", - "version": "v3.3.1", - "source": { - "type": "git", - "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/be85b3f05b46c39bbc0d95f6c071ddff669510fa", - "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa", - "shasum": "" - }, - "require": { - "php": "^7.2|^8.0", - "webmozart/assert": "^1.0" - }, - "replace": { - "mtdowling/cron-expression": "^1.0" - }, - "require-dev": { - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-webmozart-assert": "^1.0", - "phpunit/phpunit": "^7.0|^8.0|^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Cron\\": "src/Cron/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Tankersley", - "email": "chris@ctankersley.com", - "homepage": "https://github.com/dragonmantank" - } - ], - "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", - "keywords": [ - "cron", - "schedule" - ], - "support": { - "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.1" - }, - "funding": [ - { - "url": "https://github.com/dragonmantank", - "type": "github" - } - ], - "time": "2022-01-18T15:43:28+00:00" - }, - { - "name": "jean85/pretty-package-versions", - "version": "1.6.0", - "source": { - "type": "git", - "url": "https://github.com/Jean85/pretty-package-versions.git", - "reference": "1e0104b46f045868f11942aea058cd7186d6c303" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/1e0104b46f045868f11942aea058cd7186d6c303", - "reference": "1e0104b46f045868f11942aea058cd7186d6c303", - "shasum": "" - }, - "require": { - "composer/package-versions-deprecated": "^1.8.0", - "php": "^7.0|^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0|^8.5|^9.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Jean85\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Alessandro Lai", - "email": "alessandro.lai85@gmail.com" - } - ], - "description": "A wrapper for ocramius/package-versions to get pretty versions strings", - "keywords": [ - "composer", - "package", - "release", - "versions" - ], - "support": { - "issues": "https://github.com/Jean85/pretty-package-versions/issues", - "source": "https://github.com/Jean85/pretty-package-versions/tree/1.6.0" - }, - "time": "2021-02-04T16:20:16+00:00" - }, - { - "name": "laravel/pint", - "version": "v1.2.1", - "source": { - "type": "git", - "url": "https://github.com/laravel/pint.git", - "reference": "e60e2112ee779ce60f253695b273d1646a17d6f1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/e60e2112ee779ce60f253695b273d1646a17d6f1", - "reference": "e60e2112ee779ce60f253695b273d1646a17d6f1", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-mbstring": "*", - "ext-tokenizer": "*", - "ext-xml": "*", - "php": "^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.11.0", - "illuminate/view": "^9.32.0", - "laravel-zero/framework": "^9.2.0", - "mockery/mockery": "^1.5.1", - "nunomaduro/larastan": "^2.2.0", - "nunomaduro/termwind": "^1.14.0", - "pestphp/pest": "^1.22.1" - }, - "bin": [ - "builds/pint" - ], - "type": "project", - "autoload": { - "psr-4": { - "App\\": "app/", - "Database\\Seeders\\": "database/seeders/", - "Database\\Factories\\": "database/factories/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nuno Maduro", - "email": "enunomaduro@gmail.com" - } - ], - "description": "An opinionated code formatter for PHP.", - "homepage": "https://laravel.com", - "keywords": [ - "format", - "formatter", - "lint", - "linter", - "php" - ], - "support": { - "issues": "https://github.com/laravel/pint/issues", - "source": "https://github.com/laravel/pint" - }, - "time": "2022-11-29T16:25:20+00:00" - }, - { - "name": "matomo/device-detector", - "version": "6.0.0", - "source": { - "type": "git", - "url": "https://github.com/matomo-org/device-detector.git", - "reference": "7fc2af3af62bd69e6e3404d561e371a83c112be9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/matomo-org/device-detector/zipball/7fc2af3af62bd69e6e3404d561e371a83c112be9", - "reference": "7fc2af3af62bd69e6e3404d561e371a83c112be9", - "shasum": "" - }, - "require": { - "mustangostang/spyc": "*", - "php": "^7.2|^8.0" - }, - "replace": { - "piwik/device-detector": "self.version" - }, - "require-dev": { - "matthiasmullie/scrapbook": "^1.4.7", - "mayflower/mo4-coding-standard": "^v8.0.0", - "phpstan/phpstan": "^0.12.52", - "phpunit/phpunit": "^8.5.8", - "psr/cache": "^1.0.1", - "psr/simple-cache": "^1.0.1", - "symfony/yaml": "^5.1.7" - }, - "suggest": { - "doctrine/cache": "Can directly be used for caching purpose", - "ext-yaml": "Necessary for using the Pecl YAML parser" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeviceDetector\\": "" - }, - "exclude-from-classmap": [ - "Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "The Matomo Team", - "email": "hello@matomo.org", - "homepage": "https://matomo.org/team/" - } - ], - "description": "The Universal Device Detection library, that parses User Agents and detects devices (desktop, tablet, mobile, tv, cars, console, etc.), clients (browsers, media players, mobile apps, feed readers, libraries, etc), operating systems, devices, brands and models.", - "homepage": "https://matomo.org", - "keywords": [ - "devicedetection", - "parser", - "useragent" - ], - "support": { - "forum": "https://forum.matomo.org/", - "issues": "https://github.com/matomo-org/device-detector/issues", - "source": "https://github.com/matomo-org/matomo", - "wiki": "https://dev.matomo.org/" - }, - "time": "2022-04-11T09:58:17+00:00" - }, - { - "name": "mongodb/mongodb", - "version": "1.8.0", - "source": { - "type": "git", - "url": "https://github.com/mongodb/mongo-php-library.git", - "reference": "953dbc19443aa9314c44b7217a16873347e6840d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/953dbc19443aa9314c44b7217a16873347e6840d", - "reference": "953dbc19443aa9314c44b7217a16873347e6840d", - "shasum": "" - }, - "require": { - "ext-hash": "*", - "ext-json": "*", - "ext-mongodb": "^1.8.1", - "jean85/pretty-package-versions": "^1.2", - "php": "^7.0 || ^8.0", - "symfony/polyfill-php80": "^1.19" - }, - "require-dev": { - "squizlabs/php_codesniffer": "^3.5, <3.5.5", - "symfony/phpunit-bridge": "5.x-dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8.x-dev" - } - }, - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "MongoDB\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Andreas Braun", - "email": "andreas.braun@mongodb.com" - }, - { - "name": "Jeremy Mikola", - "email": "jmikola@gmail.com" - } - ], - "description": "MongoDB driver library", - "homepage": "https://jira.mongodb.org/browse/PHPLIB", - "keywords": [ - "database", - "driver", - "mongodb", - "persistence" - ], - "support": { - "issues": "https://github.com/mongodb/mongo-php-library/issues", - "source": "https://github.com/mongodb/mongo-php-library/tree/1.8.0" - }, - "time": "2020-11-25T12:26:02+00:00" - }, - { - "name": "mustangostang/spyc", - "version": "0.6.3", - "source": { - "type": "git", - "url": "git@github.com:mustangostang/spyc.git", - "reference": "4627c838b16550b666d15aeae1e5289dd5b77da0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mustangostang/spyc/zipball/4627c838b16550b666d15aeae1e5289dd5b77da0", - "reference": "4627c838b16550b666d15aeae1e5289dd5b77da0", - "shasum": "" - }, - "require": { - "php": ">=5.3.1" - }, - "require-dev": { - "phpunit/phpunit": "4.3.*@dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.5.x-dev" - } - }, - "autoload": { - "files": [ - "Spyc.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "mustangostang", - "email": "vlad.andersen@gmail.com" - } - ], - "description": "A simple YAML loader/dumper class for PHP", - "homepage": "https://github.com/mustangostang/spyc/", - "keywords": [ - "spyc", - "yaml", - "yml" - ], - "time": "2019-09-10T13:16:29+00:00" - }, - { - "name": "phpmailer/phpmailer", - "version": "v6.6.0", - "source": { - "type": "git", - "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e43bac82edc26ca04b36143a48bde1c051cfd5b1", - "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-filter": "*", - "ext-hash": "*", - "php": ">=5.5.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "doctrine/annotations": "^1.2", - "php-parallel-lint/php-console-highlighter": "^0.5.0", - "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpcompatibility/php-compatibility": "^9.3.5", - "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.6.2", - "yoast/phpunit-polyfills": "^1.0.0" - }, - "suggest": { - "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", - "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", - "league/oauth2-google": "Needed for Google XOAUTH2 authentication", - "psr/log": "For optional PSR-3 debug logging", - "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", - "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" - }, - "type": "library", - "autoload": { - "psr-4": { - "PHPMailer\\PHPMailer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1-only" - ], - "authors": [ - { - "name": "Marcus Bointon", - "email": "phpmailer@synchromedia.co.uk" - }, - { - "name": "Jim Jagielski", - "email": "jimjag@gmail.com" - }, - { - "name": "Andy Prevost", - "email": "codeworxtech@users.sourceforge.net" - }, - { - "name": "Brent R. Matzelle" - } - ], - "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "support": { - "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.0" - }, - "funding": [ - { - "url": "https://github.com/Synchro", - "type": "github" - } - ], - "time": "2022-02-28T15:31:21+00:00" - }, - { - "name": "psr/log", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" - }, - "time": "2021-05-03T11:20:27+00:00" - }, - { - "name": "resque/php-resque", - "version": "v1.3.6", - "source": { - "type": "git", - "url": "https://github.com/resque/php-resque.git", - "reference": "fe41c04763699b1318d97ed14cc78583e9380161" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/resque/php-resque/zipball/fe41c04763699b1318d97ed14cc78583e9380161", - "reference": "fe41c04763699b1318d97ed14cc78583e9380161", - "shasum": "" - }, - "require": { - "colinmollenhour/credis": "~1.7", - "php": ">=5.6.0", - "psr/log": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, - "suggest": { - "ext-pcntl": "REQUIRED for forking processes on platforms that support it (so anything but Windows).", - "ext-proctitle": "Allows php-resque to rename the title of UNIX processes to show the status of a worker.", - "ext-redis": "Native PHP extension for Redis connectivity. Credis will automatically utilize when available." - }, - "bin": [ - "bin/resque", - "bin/resque-scheduler" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Resque": "lib", - "ResqueScheduler": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dan Hunsaker", - "email": "danhunsaker+resque@gmail.com", - "role": "Maintainer" - }, - { - "name": "Rajib Ahmed", - "homepage": "https://github.com/rajibahmed", - "role": "Maintainer" - }, - { - "name": "Steve Klabnik", - "email": "steve@steveklabnik.com", - "role": "Maintainer" - }, - { - "name": "Chris Boulton", - "email": "chris@bigcommerce.com", - "role": "Creator" - } - ], - "description": "Redis backed library for creating background jobs and processing them later. Based on resque for Ruby.", - "homepage": "http://www.github.com/resque/php-resque/", - "keywords": [ - "background", - "job", - "redis", - "resque" - ], - "support": { - "issues": "https://github.com/resque/php-resque/issues", - "source": "https://github.com/resque/php-resque/tree/v1.3.6" - }, - "time": "2020-04-16T16:39:50+00:00" - }, - { - "name": "slickdeals/statsd", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/Slickdeals/statsd-php.git", - "reference": "225588a0a079e145359049f6e5e23eedb1b4c17f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Slickdeals/statsd-php/zipball/225588a0a079e145359049f6e5e23eedb1b4c17f", - "reference": "225588a0a079e145359049f6e5e23eedb1b4c17f", - "shasum": "" - }, - "require": { - "php": ">= 7.3 || ^8" - }, - "replace": { - "domnikl/statsd": "self.version" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.0", - "phpunit/phpunit": "^9", - "vimeo/psalm": "^4.6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Domnikl\\Statsd\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dominik Liebler", - "email": "liebler.dominik@gmail.com" - } - ], - "description": "a PHP client for statsd", - "homepage": "https://github.com/Slickdeals/statsd-php", - "keywords": [ - "Metrics", - "monitoring", - "statistics", - "statsd", - "udp" - ], - "support": { - "issues": "https://github.com/Slickdeals/statsd-php/issues", - "source": "https://github.com/Slickdeals/statsd-php/tree/3.1.0" - }, - "time": "2021-06-04T20:33:46+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "utopia-php/abuse", - "version": "0.16.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/abuse.git", - "reference": "6370d9150425460416583feba0990504ac789e98" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/abuse/zipball/6370d9150425460416583feba0990504ac789e98", - "reference": "6370d9150425460416583feba0990504ac789e98", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-pdo": "*", - "php": ">=8.0", - "utopia-php/database": "0.28.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.4", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Abuse\\": "src/Abuse" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple abuse library to manage application usage limits", - "keywords": [ - "Abuse", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/abuse/issues", - "source": "https://github.com/utopia-php/abuse/tree/0.16.0" - }, - "time": "2022-10-31T14:46:41+00:00" - }, - { - "name": "utopia-php/analytics", - "version": "0.2.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/analytics.git", - "reference": "adfc2d057a7f6ab618a77c8a20ed3e35485ff416" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/analytics/zipball/adfc2d057a7f6ab618a77c8a20ed3e35485ff416", - "reference": "adfc2d057a7f6ab618a77c8a20ed3e35485ff416", - "shasum": "" - }, - "require": { - "php": ">=7.4" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Analytics\\": "src/Analytics" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Torsten Dittmann", - "email": "torsten@appwrite.io" - } - ], - "description": "A simple library to track events & users.", - "keywords": [ - "analytics", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/analytics/issues", - "source": "https://github.com/utopia-php/analytics/tree/0.2.0" - }, - "time": "2021-03-23T21:33:07+00:00" - }, - { - "name": "utopia-php/audit", - "version": "0.17.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/audit.git", - "reference": "455471bd4de8d74026809e843f8c9740eb32922c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/audit/zipball/455471bd4de8d74026809e843f8c9740eb32922c", - "reference": "455471bd4de8d74026809e843f8c9740eb32922c", - "shasum": "" - }, - "require": { - "ext-pdo": "*", - "php": ">=8.0", - "utopia-php/database": "0.28.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Audit\\": "src/Audit" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A simple audit library to manage application users logs", - "keywords": [ - "Audit", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/audit/issues", - "source": "https://github.com/utopia-php/audit/tree/0.17.0" - }, - "time": "2022-10-31T14:44:52+00:00" - }, - { - "name": "utopia-php/cache", - "version": "0.8.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/cache.git", - "reference": "212e66100a1f32e674fca5d9bc317cc998303089" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/cache/zipball/212e66100a1f32e674fca5d9bc317cc998303089", - "reference": "212e66100a1f32e674fca5d9bc317cc998303089", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-memcached": "*", - "ext-redis": "*", - "php": ">=8.0" - }, - "require-dev": { - "laravel/pint": "1.2.*", - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.13.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Cache\\": "src/Cache" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A simple cache library to manage application cache storing, loading and purging", - "keywords": [ - "cache", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/cache/issues", - "source": "https://github.com/utopia-php/cache/tree/0.8.0" - }, - "time": "2022-10-16T16:48:09+00:00" - }, - { - "name": "utopia-php/cli", - "version": "0.14.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/cli.git", - "reference": "c30ef985a4e739758a0d95eb0706b357b6d8c086" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/cli/zipball/c30ef985a4e739758a0d95eb0706b357b6d8c086", - "reference": "c30ef985a4e739758a0d95eb0706b357b6d8c086", - "shasum": "" - }, - "require": { - "php": ">=7.4", - "utopia-php/framework": "0.*.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "squizlabs/php_codesniffer": "^3.6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\CLI\\": "src/CLI" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple CLI library to manage command line applications", - "keywords": [ - "cli", - "command line", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/cli/issues", - "source": "https://github.com/utopia-php/cli/tree/0.14.0" - }, - "time": "2022-10-09T10:19:07+00:00" - }, - { - "name": "utopia-php/config", - "version": "0.2.2", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/config.git", - "reference": "a3d7bc0312d7150d5e04b1362dc34b2b136908cc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/config/zipball/a3d7bc0312d7150d5e04b1362dc34b2b136908cc", - "reference": "a3d7bc0312d7150d5e04b1362dc34b2b136908cc", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Config\\": "src/Config" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple Config library to managing application config variables", - "keywords": [ - "config", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/config/issues", - "source": "https://github.com/utopia-php/config/tree/0.2.2" - }, - "time": "2020-10-24T09:49:09+00:00" - }, - { - "name": "utopia-php/database", - "version": "dev-increment", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/database.git", - "reference": "fc0a8bfc9826e1e64521a8e7a95904f9a999d6fb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/fc0a8bfc9826e1e64521a8e7a95904f9a999d6fb", - "reference": "fc0a8bfc9826e1e64521a8e7a95904f9a999d6fb", - "shasum": "" - }, - "require": { - "ext-pdo": "*", - "php": ">=8.0", - "utopia-php/cache": "0.8.*", - "utopia-php/framework": "0.*.*", - "utopia-php/mongo": "0.0.2" - }, - "require-dev": { - "ext-mongodb": "*", - "ext-redis": "*", - "fakerphp/faker": "^1.14", - "mongodb/mongodb": "1.8.0", - "phpunit/phpunit": "^9.4", - "swoole/ide-helper": "4.8.0", - "utopia-php/cli": "^0.11.0", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Database\\": "src/Database" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A simple library to manage application persistency using multiple database adapters", - "keywords": [ - "database", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/increment" - }, - "time": "2022-12-08T08:59:37+00:00" - }, - { - "name": "utopia-php/domains", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/domains.git", - "reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/domains/zipball/1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73", - "reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Domains\\": "src/Domains" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "Utopia Domains library is simple and lite library for parsing web domains. This library is aiming to be as simple and easy to learn and use.", - "keywords": [ - "domains", - "framework", - "icann", - "php", - "public suffix", - "tld", - "tld extract", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/domains/issues", - "source": "https://github.com/utopia-php/domains/tree/master" - }, - "time": "2020-02-23T07:40:02+00:00" - }, - { - "name": "utopia-php/dsn", - "version": "0.1.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/dsn.git", - "reference": "17a5935eab1b89fb4b95600db50a1b6d5faa6cea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/dsn/zipball/17a5935eab1b89fb4b95600db50a1b6d5faa6cea", - "reference": "17a5935eab1b89fb4b95600db50a1b6d5faa6cea", - "shasum": "" - }, - "require": { - "php": ">=8.0" - }, - "require-dev": { - "laravel/pint": "1.2.*", - "phpunit/phpunit": "^9.3", - "squizlabs/php_codesniffer": "^3.6", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\DSN\\": "src/DSN" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A simple library for parsing and managing Data Source Names ( DSNs )", - "keywords": [ - "dsn", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/dsn/issues", - "source": "https://github.com/utopia-php/dsn/tree/0.1.0" - }, - "time": "2022-10-26T10:06:20+00:00" - }, - { - "name": "utopia-php/framework", - "version": "0.25.1", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/framework.git", - "reference": "2391b397135586b2100d39e338827bef8d2f4ad0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/framework/zipball/2391b397135586b2100d39e338827bef8d2f4ad0", - "reference": "2391b397135586b2100d39e338827bef8d2f4ad0", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "require-dev": { - "laravel/pint": "^1.2", - "phpunit/phpunit": "^9.5.25", - "vimeo/psalm": "4.27.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A simple, light and advanced PHP framework", - "keywords": [ - "framework", - "php", - "upf" - ], - "support": { - "issues": "https://github.com/utopia-php/framework/issues", - "source": "https://github.com/utopia-php/framework/tree/0.25.1" - }, - "time": "2022-11-23T18:22:23+00:00" - }, - { - "name": "utopia-php/image", - "version": "0.5.4", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/image.git", - "reference": "ca5f436f9aa22dedaa6648f24f3687733808e336" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/image/zipball/ca5f436f9aa22dedaa6648f24f3687733808e336", - "reference": "ca5f436f9aa22dedaa6648f24f3687733808e336", - "shasum": "" - }, - "require": { - "ext-imagick": "*", - "php": ">=8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.13.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Image\\": "src/Image" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple Image manipulation library", - "keywords": [ - "framework", - "image", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/image/issues", - "source": "https://github.com/utopia-php/image/tree/0.5.4" - }, - "time": "2022-05-11T12:30:41+00:00" - }, - { - "name": "utopia-php/locale", - "version": "0.4.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/locale.git", - "reference": "c2d9358d0fe2f6b6ed5448369f9d1e430c615447" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/locale/zipball/c2d9358d0fe2f6b6ed5448369f9d1e430c615447", - "reference": "c2d9358d0fe2f6b6ed5448369f9d1e430c615447", - "shasum": "" - }, - "require": { - "php": ">=7.4" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Locale\\": "src/Locale" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple locale library to manage application translations", - "keywords": [ - "framework", - "locale", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/locale/issues", - "source": "https://github.com/utopia-php/locale/tree/0.4.0" - }, - "time": "2021-07-24T11:35:55+00:00" - }, - { - "name": "utopia-php/logger", - "version": "0.3.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/logger.git", - "reference": "079656cb5169ca9600861eda0b6819199e3d4a57" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/logger/zipball/079656cb5169ca9600861eda0b6819199e3d4a57", - "reference": "079656cb5169ca9600861eda0b6819199e3d4a57", - "shasum": "" - }, - "require": { - "php": ">=8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Logger\\": "src/Logger" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Matej Bačo", - "email": "matej@appwrite.io" - }, - { - "name": "Christy Jacob", - "email": "christy@appwrite.io" - } - ], - "description": "Utopia Logger library is simple and lite library for logging information, such as errors or warnings. This library is aiming to be as simple and easy to learn and use.", - "keywords": [ - "appsignal", - "errors", - "framework", - "logger", - "logging", - "logs", - "php", - "raygun", - "sentry", - "upf", - "utopia", - "warnings" - ], - "support": { - "issues": "https://github.com/utopia-php/logger/issues", - "source": "https://github.com/utopia-php/logger/tree/0.3.0" - }, - "time": "2022-03-18T10:56:57+00:00" - }, - { - "name": "utopia-php/messaging", - "version": "0.1.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/messaging.git", - "reference": "501272fad666f06bec8f130076862e7981a73f8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/messaging/zipball/501272fad666f06bec8f130076862e7981a73f8c", - "reference": "501272fad666f06bec8f130076862e7981a73f8c", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": ">=8.0.0" - }, - "require-dev": { - "phpmailer/phpmailer": "6.6.*", - "phpunit/phpunit": "9.5.*", - "squizlabs/php_codesniffer": "^3.6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Messaging\\": "src/Utopia/Messaging" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jake Barnby", - "email": "jake@appwrite.io" - } - ], - "description": "A simple, light and advanced PHP messaging library", - "keywords": [ - "library", - "messaging", - "php", - "upf", - "utopia", - "utopia-php" - ], - "support": { - "issues": "https://github.com/utopia-php/messaging/issues", - "source": "https://github.com/utopia-php/messaging/tree/0.1.0" - }, - "time": "2022-09-29T11:22:48+00:00" - }, - { - "name": "utopia-php/mongo", - "version": "0.0.2", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/mongo.git", - "reference": "62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/mongo/zipball/62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e", - "reference": "62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e", - "shasum": "" - }, - "require": { - "ext-mongodb": "*", - "mongodb/mongodb": "1.8.0", - "php": ">=8.0" - }, - "require-dev": { - "fakerphp/faker": "^1.14", - "laravel/pint": "1.2.*", - "phpstan/phpstan": "1.8.*", - "phpunit/phpunit": "^9.4", - "swoole/ide-helper": "4.8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Mongo\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Wess", - "email": "wess@appwrite.io" - } - ], - "description": "A simple library to manage Mongo database", - "keywords": [ - "database", - "mongo", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/mongo/issues", - "source": "https://github.com/utopia-php/mongo/tree/0.0.2" - }, - "time": "2022-11-08T11:58:46+00:00" - }, - { - "name": "utopia-php/orchestration", - "version": "0.9.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/orchestration.git", - "reference": "1d4f66684b8c4927f31b695817eae6d84aafd172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/orchestration/zipball/1d4f66684b8c4927f31b695817eae6d84aafd172", - "reference": "1d4f66684b8c4927f31b695817eae6d84aafd172", - "shasum": "" - }, - "require": { - "php": ">=8.0", - "utopia-php/cli": "0.14.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Orchestration\\": "src/Orchestration" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Lite & fast micro PHP abstraction library for container orchestration", - "keywords": [ - "docker", - "framework", - "kubernetes", - "orchestration", - "php", - "swarm", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/orchestration/issues", - "source": "https://github.com/utopia-php/orchestration/tree/0.9.0" - }, - "time": "2022-11-09T17:38:00+00:00" - }, - { - "name": "utopia-php/platform", - "version": "0.3.1", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/platform.git", - "reference": "fe9f64420957dc8fb6201d22b499572f021411e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/platform/zipball/fe9f64420957dc8fb6201d22b499572f021411e4", - "reference": "fe9f64420957dc8fb6201d22b499572f021411e4", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-redis": "*", - "php": ">=8.0", - "utopia-php/cli": "0.14.*", - "utopia-php/framework": "0.25.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "squizlabs/php_codesniffer": "^3.6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Platform\\": "src/Platform" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Light and Fast Platform Library", - "keywords": [ - "cache", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/platform/issues", - "source": "https://github.com/utopia-php/platform/tree/0.3.1" - }, - "time": "2022-11-10T07:04:24+00:00" - }, - { - "name": "utopia-php/pools", - "version": "0.4.2", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/pools.git", - "reference": "d2870ab74b31b7f4027799f082e85122154f8bed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/pools/zipball/d2870ab74b31b7f4027799f082e85122154f8bed", - "reference": "d2870ab74b31b7f4027799f082e85122154f8bed", - "shasum": "" - }, - "require": { - "php": ">=8.0" - }, - "require-dev": { - "laravel/pint": "1.2.*", - "phpstan/phpstan": "1.8.*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Pools\\": "src/Pools" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Team Appwrite", - "email": "team@appwrite.io" - } - ], - "description": "A simple library to manage connection pools", - "keywords": [ - "framework", - "php", - "pools", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/pools/issues", - "source": "https://github.com/utopia-php/pools/tree/0.4.2" - }, - "time": "2022-11-22T07:55:45+00:00" - }, - { - "name": "utopia-php/preloader", - "version": "0.2.4", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/preloader.git", - "reference": "65ef48392e72172f584b0baa2e224f9a1cebcce0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/preloader/zipball/65ef48392e72172f584b0baa2e224f9a1cebcce0", - "reference": "65ef48392e72172f584b0baa2e224f9a1cebcce0", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Preloader\\": "src/Preloader" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "team@appwrite.io" - } - ], - "description": "Utopia Preloader library is simple and lite library for managing PHP preloading configuration", - "keywords": [ - "framework", - "php", - "preload", - "preloader", - "preloading", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/preloader/issues", - "source": "https://github.com/utopia-php/preloader/tree/0.2.4" - }, - "time": "2020-10-24T07:04:59+00:00" - }, - { - "name": "utopia-php/queue", - "version": "0.5.1", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/queue.git", - "reference": "4b39e1f232b2e619b0d7fb4004f2356df334ddc1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/queue/zipball/4b39e1f232b2e619b0d7fb4004f2356df334ddc1", - "reference": "4b39e1f232b2e619b0d7fb4004f2356df334ddc1", - "shasum": "" - }, - "require": { - "php": ">=8.0", - "utopia-php/cli": "0.14.*", - "utopia-php/framework": "0.*.*" - }, - "require-dev": { - "laravel/pint": "^0.2.3", - "phpstan/phpstan": "^1.8", - "phpunit/phpunit": "^9.5.5", - "swoole/ide-helper": "4.8.8", - "workerman/workerman": "^4.0" - }, - "suggest": { - "ext-swoole": "Needed to support Swoole.", - "workerman/workerman": "Needed to support Workerman." - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Queue\\": "src/Queue" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Torsten Dittmann", - "email": "torsten@appwrite.io" - } - ], - "description": "A powerful task queue.", - "keywords": [ - "Tasks", - "framework", - "php", - "queue", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/queue/issues", - "source": "https://github.com/utopia-php/queue/tree/0.5.1" - }, - "time": "2022-11-16T19:47:26+00:00" - }, - { - "name": "utopia-php/registry", - "version": "0.5.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/registry.git", - "reference": "bedc4ed54527b2803e6dfdccc39449f98522b70d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/registry/zipball/bedc4ed54527b2803e6dfdccc39449f98522b70d", - "reference": "bedc4ed54527b2803e6dfdccc39449f98522b70d", - "shasum": "" - }, - "require": { - "php": ">=7.4" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Registry\\": "src/Registry" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple dependency management library for PHP", - "keywords": [ - "dependency management", - "di", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/registry/issues", - "source": "https://github.com/utopia-php/registry/tree/0.5.0" - }, - "time": "2021-03-10T10:45:22+00:00" - }, - { - "name": "utopia-php/storage", - "version": "0.13.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/storage.git", - "reference": "f34c010e4f8394a6b4aff70b6de55041d9a145d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/storage/zipball/f34c010e4f8394a6b4aff70b6de55041d9a145d3", - "reference": "f34c010e4f8394a6b4aff70b6de55041d9a145d3", - "shasum": "" - }, - "require": { - "ext-fileinfo": "*", - "ext-zlib": "*", - "ext-zstd": "*", - "php": ">=8.0", - "utopia-php/framework": "0.*.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Storage\\": "src/Storage" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple Storage library to manage application storage", - "keywords": [ - "framework", - "php", - "storage", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/storage/issues", - "source": "https://github.com/utopia-php/storage/tree/0.13.0" - }, - "time": "2022-11-17T15:10:18+00:00" - }, - { - "name": "utopia-php/swoole", - "version": "0.5.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/swoole.git", - "reference": "c2a3a4f944a2f22945af3cbcb95b13f0769628b1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/swoole/zipball/c2a3a4f944a2f22945af3cbcb95b13f0769628b1", - "reference": "c2a3a4f944a2f22945af3cbcb95b13f0769628b1", - "shasum": "" - }, - "require": { - "ext-swoole": "*", - "php": ">=8.0", - "utopia-php/framework": "0.*.*" - }, - "require-dev": { - "laravel/pint": "1.2.*", - "phpunit/phpunit": "^9.3", - "swoole/ide-helper": "4.8.3", - "vimeo/psalm": "4.15.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Swoole\\": "src/Swoole" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "An extension for Utopia Framework to work with PHP Swoole as a PHP FPM alternative", - "keywords": [ - "framework", - "http", - "php", - "server", - "swoole", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/swoole/issues", - "source": "https://github.com/utopia-php/swoole/tree/0.5.0" - }, - "time": "2022-10-19T22:19:07+00:00" - }, - { - "name": "utopia-php/system", - "version": "0.6.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/system.git", - "reference": "289c4327713deadc9c748b5317d248133a02f245" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/system/zipball/289c4327713deadc9c748b5317d248133a02f245", - "reference": "289c4327713deadc9c748b5317d248133a02f245", - "shasum": "" - }, - "require": { - "laravel/pint": "1.2.*", - "php": ">=7.4" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "squizlabs/php_codesniffer": "^3.6", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\System\\": "src/System" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Torsten Dittmann", - "email": "torsten@appwrite.io" - } - ], - "description": "A simple library for obtaining information about the host's system.", - "keywords": [ - "framework", - "php", - "system", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/system/issues", - "source": "https://github.com/utopia-php/system/tree/0.6.0" - }, - "time": "2022-11-07T13:51:59+00:00" - }, - { - "name": "utopia-php/websocket", - "version": "0.1.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/websocket.git", - "reference": "51fcb86171400d8aa40d76c54593481fd273dab5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/websocket/zipball/51fcb86171400d8aa40d76c54593481fd273dab5", - "reference": "51fcb86171400d8aa40d76c54593481fd273dab5", - "shasum": "" - }, - "require": { - "php": ">=8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5.5", - "swoole/ide-helper": "4.6.6", - "textalk/websocket": "1.5.2", - "vimeo/psalm": "^4.8.1", - "workerman/workerman": "^4.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\WebSocket\\": "src/WebSocket" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Torsten Dittmann", - "email": "torsten@appwrite.io" - } - ], - "description": "A simple abstraction for WebSocket servers.", - "keywords": [ - "framework", - "php", - "upf", - "utopia", - "websocket" - ], - "support": { - "issues": "https://github.com/utopia-php/websocket/issues", - "source": "https://github.com/utopia-php/websocket/tree/0.1.0" - }, - "time": "2021-12-20T10:50:09+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "php": "^7.2 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" - }, - "time": "2022-06-03T18:03:27+00:00" - } - ], - "packages-dev": [ - { - "name": "appwrite/sdk-generator", - "version": "0.28.1", - "source": { - "type": "git", - "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "ed8d3daa66589733b49b11c053d524cdf576ffee" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ed8d3daa66589733b49b11c053d524cdf576ffee", - "reference": "ed8d3daa66589733b49b11c053d524cdf576ffee", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "matthiasmullie/minify": "^1.3.68", - "php": ">=7.0.0", - "twig/twig": "^3.4.1" - }, - "require-dev": { - "brianium/paratest": "^6.4", - "phpunit/phpunit": "^9.5.21" - }, - "type": "library", - "autoload": { - "psr-4": { - "Appwrite\\SDK\\": "src/SDK", - "Appwrite\\Spec\\": "src/Spec" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "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.28.1" - }, - "time": "2022-09-22T09:15:54+00:00" - }, - { - "name": "doctrine/annotations", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "d02c9f3742044e17d5fa8d28d8402a2d95c33302" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/d02c9f3742044e17d5fa8d28d8402a2d95c33302", - "reference": "d02c9f3742044e17d5fa8d28d8402a2d95c33302", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^2 || ^3", - "ext-tokenizer": "*", - "php": "^7.2 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^2.0", - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6", - "vimeo/psalm": "^4.10" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.0" - }, - "time": "2022-12-19T18:17:20+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.5.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-12-30T00:15:36+00:00" - }, - { - "name": "doctrine/lexer", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "84a527db05647743d50373e0ec53a152f2cde568" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/84a527db05647743d50373e0ec53a152f2cde568", - "reference": "84a527db05647743d50373e0ec53a152f2cde568", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.9", - "phpunit/phpunit": "^9.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/3.0.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2022-12-15T16:57:16+00:00" - }, - { - "name": "matthiasmullie/minify", - "version": "1.3.70", - "source": { - "type": "git", - "url": "https://github.com/matthiasmullie/minify.git", - "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/2807d9f9bece6877577ad44acb5c801bb3ae536b", - "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b", - "shasum": "" - }, - "require": { - "ext-pcre": "*", - "matthiasmullie/path-converter": "~1.1", - "php": ">=5.3.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": ">=2.0", - "matthiasmullie/scrapbook": ">=1.3", - "phpunit/phpunit": ">=4.8", - "squizlabs/php_codesniffer": ">=3.0" - }, - "suggest": { - "psr/cache-implementation": "Cache implementation to use with Minify::cache" - }, - "bin": [ - "bin/minifycss", - "bin/minifyjs" - ], - "type": "library", - "autoload": { - "psr-4": { - "MatthiasMullie\\Minify\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthias Mullie", - "email": "minify@mullie.eu", - "homepage": "https://www.mullie.eu", - "role": "Developer" - } - ], - "description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.", - "homepage": "https://github.com/matthiasmullie/minify", - "keywords": [ - "JS", - "css", - "javascript", - "minifier", - "minify" - ], - "support": { - "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.70" - }, - "funding": [ - { - "url": "https://github.com/matthiasmullie", - "type": "github" - } - ], - "time": "2022-12-09T12:56:44+00:00" - }, - { - "name": "matthiasmullie/path-converter", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/matthiasmullie/path-converter.git", - "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/path-converter/zipball/e7d13b2c7e2f2268e1424aaed02085518afa02d9", - "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9", - "shasum": "" - }, - "require": { - "ext-pcre": "*", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "MatthiasMullie\\PathConverter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthias Mullie", - "email": "pathconverter@mullie.eu", - "homepage": "http://www.mullie.eu", - "role": "Developer" - } - ], - "description": "Relative path converter", - "homepage": "http://github.com/matthiasmullie/path-converter", - "keywords": [ - "converter", - "path", - "paths", - "relative" - ], - "support": { - "issues": "https://github.com/matthiasmullie/path-converter/issues", - "source": "https://github.com/matthiasmullie/path-converter/tree/1.1.3" - }, - "time": "2019-02-05T23:41:09+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2022-03-03T13:19:32+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.15.2", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", - "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2" - }, - "time": "2022-11-12T15:38:23+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" - }, - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "phpbench/container", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/phpbench/container.git", - "reference": "6d555ff7174fca13f9b1ec0b4a089ed41d0ab392" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpbench/container/zipball/6d555ff7174fca13f9b1ec0b4a089ed41d0ab392", - "reference": "6d555ff7174fca13f9b1ec0b4a089ed41d0ab392", - "shasum": "" - }, - "require": { - "psr/container": "^1.0|^2.0", - "symfony/options-resolver": "^4.2 || ^5.0 || ^6.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", - "phpstan/phpstan": "^0.12.52", - "phpunit/phpunit": "^8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "PhpBench\\DependencyInjection\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Leech", - "email": "daniel@dantleech.com" - } - ], - "description": "Simple, configurable, service container.", - "support": { - "issues": "https://github.com/phpbench/container/issues", - "source": "https://github.com/phpbench/container/tree/2.2.1" - }, - "time": "2022-01-25T10:17:35+00:00" - }, - { - "name": "phpbench/dom", - "version": "0.3.2", - "source": { - "type": "git", - "url": "https://github.com/phpbench/dom.git", - "reference": "b013b717832ddbaadf2a40984b04bc66af9a7110" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpbench/dom/zipball/b013b717832ddbaadf2a40984b04bc66af9a7110", - "reference": "b013b717832ddbaadf2a40984b04bc66af9a7110", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "php": "^7.2||^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.18", - "phpstan/phpstan": "^0.12.83", - "phpunit/phpunit": "^8.0||^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpBench\\Dom\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Leech", - "email": "daniel@dantleech.com" - } - ], - "description": "DOM wrapper to simplify working with the PHP DOM implementation", - "support": { - "issues": "https://github.com/phpbench/dom/issues", - "source": "https://github.com/phpbench/dom/tree/0.3.2" - }, - "time": "2021-09-24T15:26:07+00:00" - }, - { - "name": "phpbench/phpbench", - "version": "1.2.8", - "source": { - "type": "git", - "url": "https://github.com/phpbench/phpbench.git", - "reference": "3f7b3c200f86727de7a14bde94adb68a88e1bafc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpbench/phpbench/zipball/3f7b3c200f86727de7a14bde94adb68a88e1bafc", - "reference": "3f7b3c200f86727de7a14bde94adb68a88e1bafc", - "shasum": "" - }, - "require": { - "doctrine/annotations": "^1.13 || ^2.0", - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "ext-tokenizer": "*", - "php": "^7.3 || ^8.0", - "phpbench/container": "^2.1", - "phpbench/dom": "~0.3.1", - "psr/log": "^1.1 || ^2.0 || ^3.0", - "seld/jsonlint": "^1.1", - "symfony/console": "^4.2 || ^5.0 || ^6.0", - "symfony/filesystem": "^4.2 || ^5.0 || ^6.0", - "symfony/finder": "^4.2 || ^5.0 || ^6.0", - "symfony/options-resolver": "^4.2 || ^5.0 || ^6.0", - "symfony/process": "^4.2 || ^5.0 || ^6.0", - "webmozart/glob": "^4.6" - }, - "require-dev": { - "dantleech/invoke": "^2.0", - "friendsofphp/php-cs-fixer": "^3.0", - "jangregor/phpstan-prophecy": "^1.0", - "phpspec/prophecy": "^1.12", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^8.5.8 || ^9.0", - "symfony/error-handler": "^5.2 || ^6.0", - "symfony/var-dumper": "^4.0 || ^5.0 || ^6.0" - }, - "suggest": { - "ext-xdebug": "For Xdebug profiling extension." - }, - "bin": [ - "bin/phpbench" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "autoload": { - "files": [ - "lib/Report/Func/functions.php" - ], - "psr-4": { - "PhpBench\\": "lib/", - "PhpBench\\Extensions\\XDebug\\": "extensions/xdebug/lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Leech", - "email": "daniel@dantleech.com" - } - ], - "description": "PHP Benchmarking Framework", - "support": { - "issues": "https://github.com/phpbench/phpbench/issues", - "source": "https://github.com/phpbench/phpbench/tree/1.2.8" - }, - "funding": [ - { - "url": "https://github.com/dantleech", - "type": "github" - } - ], - "time": "2023-01-14T13:08:42+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", - "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.1", - "phpunit/phpunit": "^9.5", - "rector/rector": "^0.13.9", - "vimeo/psalm": "^4.25" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "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.2" - }, - "time": "2022-10-14T12:47:21+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.16.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be8cac52a0827776ff9ccda8c381ac5b71aeb359", - "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.16.0" - }, - "time": "2022-11-29T15:06:56+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.23", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", - "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.14", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.23" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-12-28T12:41:10+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-12-02T12:48:52+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.5.20", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba", - "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.13", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", - "sebastian/version": "^3.0.2" - }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.5-dev" - } - }, - "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20" - }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-04-01T12:37:26+00:00" - }, - { - "name": "psr/cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" - }, - "time": "2021-02-03T23:26:27+00:00" - }, - { - "name": "psr/container", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" - }, - "time": "2021-11-05T16:47:00+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:08:49+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-09-14T12:41:17+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:52:27+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:10:38+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-04-03T09:37:03+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-09-14T06:03:37+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-02-14T08:28:10+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-28T06:42:11+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" - }, - { - "name": "sebastian/type", - "version": "3.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-09-12T14:47:03+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "seld/jsonlint", - "version": "1.9.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "4211420d25eba80712bff236a98960ef68b866b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/4211420d25eba80712bff236a98960ef68b866b7", - "reference": "4211420d25eba80712bff236a98960ef68b866b7", - "shasum": "" - }, - "require": { - "php": "^5.3 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.5", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" - }, - "bin": [ - "bin/jsonlint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Seld\\JsonLint\\": "src/Seld/JsonLint/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "JSON Linter", - "keywords": [ - "json", - "linter", - "parser", - "validator" - ], - "support": { - "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.9.0" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", - "type": "tidelift" - } - ], - "time": "2022-04-01T13:37:23+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.7.1", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2022-06-18T07:21:10+00:00" - }, - { - "name": "swoole/ide-helper", - "version": "4.8.9", - "source": { - "type": "git", - "url": "https://github.com/swoole/ide-helper.git", - "reference": "8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/swoole/ide-helper/zipball/8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe", - "reference": "8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe", - "shasum": "" - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Team Swoole", - "email": "team@swoole.com" - } - ], - "description": "IDE help files for Swoole.", - "support": { - "issues": "https://github.com/swoole/ide-helper/issues", - "source": "https://github.com/swoole/ide-helper/tree/4.8.9" - }, - "funding": [ - { - "url": "https://gitee.com/swoole/swoole?donate=true", - "type": "custom" - }, - { - "url": "https://github.com/swoole", - "type": "github" - } - ], - "time": "2022-04-18T20:38:04+00:00" - }, - { - "name": "symfony/console", - "version": "v5.4.17", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f", - "reference": "58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" - }, - "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" - }, - "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command line", - "console", - "terminal" - ], - "support": { - "source": "https://github.com/symfony/console/tree/v5.4.17" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-12-28T14:15:31+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.3-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-25T10:21:52+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v5.4.13", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "ac09569844a9109a5966b9438fc29113ce77cf51" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/ac09569844a9109a5966b9438fc29113ce77cf51", - "reference": "ac09569844a9109a5966b9438fc29113ce77cf51", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.13" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-09-21T19:53:16+00:00" - }, - { - "name": "symfony/finder", - "version": "v5.4.17", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "40c08632019838dfb3350f18cf5563b8080055fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/40c08632019838dfb3350f18cf5563b8080055fc", - "reference": "40c08632019838dfb3350f18cf5563b8080055fc", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.17" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-12-22T10:31:03+00:00" - }, - { - "name": "symfony/options-resolver", - "version": "v5.4.11", - "source": { - "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/54f14e36aa73cb8f7261d7686691fd4d75ea2690", - "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an improved replacement for the array_replace PHP function", - "homepage": "https://symfony.com", - "keywords": [ - "config", - "configuration", - "options" - ], - "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-07-20T13:00:38+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's grapheme_* functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/process", - "version": "v5.4.11", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/6e75fe6874cbc7e4773d049616ab450eff537bf1", - "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/process/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-06-27T16:58:25+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v3.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/aac98028c69df04ee77eb69b96b86ee51fbf4b75", - "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/container": "^2.0" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.3-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-25T10:21:52+00:00" - }, - { - "name": "symfony/string", - "version": "v6.2.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "863219fd713fa41cbcd285a79723f94672faff4d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/863219fd713fa41cbcd285a79723f94672faff4d", - "reference": "863219fd713fa41cbcd285a79723f94672faff4d", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/translation-contracts": "<2.0" - }, - "require-dev": { - "symfony/error-handler": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/intl": "^6.2", - "symfony/translation-contracts": "^2.0|^3.0", - "symfony/var-exporter": "^5.4|^6.0" - }, - "type": "library", - "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\String\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", - "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], - "support": { - "source": "https://github.com/symfony/string/tree/v6.2.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-12-14T16:11:27+00:00" - }, - { - "name": "textalk/websocket", - "version": "1.5.7", - "source": { - "type": "git", - "url": "https://github.com/Textalk/websocket-php.git", - "reference": "1712325e99b6bf869ccbf9bf41ab749e7328ea46" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Textalk/websocket-php/zipball/1712325e99b6bf869ccbf9bf41ab749e7328ea46", - "reference": "1712325e99b6bf869ccbf9bf41ab749e7328ea46", - "shasum": "" - }, - "require": { - "php": "^7.2 | ^8.0", - "psr/log": "^1 | ^2 | ^3" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.0", - "phpunit/phpunit": "^8.0|^9.0", - "squizlabs/php_codesniffer": "^3.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "WebSocket\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Fredrik Liljegren" - }, - { - "name": "Sören Jensen", - "email": "soren@abicart.se" - } - ], - "description": "WebSocket client and server", - "support": { - "issues": "https://github.com/Textalk/websocket-php/issues", - "source": "https://github.com/Textalk/websocket-php/tree/1.5.7" - }, - "time": "2022-03-29T09:46:59+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "twig/twig", - "version": "v3.5.0", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/3ffcf4b7d890770466da3b2666f82ac054e7ec72", - "reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" - }, - "require-dev": { - "psr/container": "^1.0", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.5-dev" - } - }, - "autoload": { - "psr-4": { - "Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Twig Team", - "role": "Contributors" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "https://twig.symfony.com", - "keywords": [ - "templating" - ], - "support": { - "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.5.0" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/twig/twig", - "type": "tidelift" - } - ], - "time": "2022-12-27T12:28:18+00:00" - }, - { - "name": "webmozart/glob", - "version": "4.6.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/glob.git", - "reference": "3c17f7dec3d9d0e87b575026011f2e75a56ed655" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/glob/zipball/3c17f7dec3d9d0e87b575026011f2e75a56ed655", - "reference": "3c17f7dec3d9d0e87b575026011f2e75a56ed655", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8.0.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5", - "symfony/filesystem": "^5.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.1-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Glob\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "A PHP implementation of Ant's glob.", - "support": { - "issues": "https://github.com/webmozarts/glob/issues", - "source": "https://github.com/webmozarts/glob/tree/4.6.0" - }, - "time": "2022-05-24T19:45:58+00:00" - } - ], - "aliases": [ - { - "package": "utopia-php/database", - "version": "dev-increment", - "alias": "0.28.0", - "alias_normalized": "0.28.0.0" - } - ], - "minimum-stability": "stable", - "stability-flags": { - "utopia-php/database": 20 - }, - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=8.0.0", - "ext-curl": "*", - "ext-imagick": "*", - "ext-mbstring": "*", - "ext-json": "*", - "ext-yaml": "*", - "ext-dom": "*", - "ext-redis": "*", - "ext-swoole": "*", - "ext-pdo": "*", - "ext-openssl": "*", - "ext-zlib": "*", - "ext-sockets": "*" - }, - "platform-dev": { - "ext-fileinfo": "*" - }, - "platform-overrides": { - "php": "8.0" - }, - "plugin-api-version": "2.2.0" -} diff --git a/phpbench.json b/phpbench.json deleted file mode 100644 index 4ebdc080b..000000000 --- a/phpbench.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "./vendor/phpbench/phpbench/phpbench.schema.json", - "runner.path": "tests/benchmarks", - "runner.file_pattern": "*Bench.php", - "runner.bootstrap": "app/init.php", - "runner.revs": 1000, - "runner.iterations": 3, - "runner.retry_threshold": 5, - "runner.warmup": 1, - "report.generators": { - "appwrite": { - "extends": "aggregate", - "cols": ["benchmark", "subject", "set" ,"revs", "its", "worst", "best", "mean", "mode", "rstdev"], - "break": ["benchmark"] - } - } -} \ No newline at end of file diff --git a/tests/benchmarks/Scopes/Scope.php b/tests/benchmarks/Scopes/Scope.php deleted file mode 100644 index 03b2d7f1e..000000000 --- a/tests/benchmarks/Scopes/Scope.php +++ /dev/null @@ -1,14 +0,0 @@ -client->call(Client::METHOD_POST, '/databases/' . static::$databaseId . '/collections/' . static::$collectionId . '/documents', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'documentId' => ID::unique(), - 'data' => [ - 'title' => 'The Matrix', - ], - 'permissions' => [ - Permission::read(Role::user($this->getUser()['$id'])), - Permission::write(Role::user($this->getUser()['$id'])), - ], - ]); - } - - #[ParamProviders(['provideCounts'])] - #[BeforeMethods(['createDatabase', 'createCollection', 'createDocuments'])] - public function benchDocumentReadList(array $params) - { - $this->client->call(Client::METHOD_GET, '/databases/' . static::$databaseId . '/collections/' . static::$collectionId . '/documents', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'queries' => ['limit(' . $params['documents'] . ')'], - ]); - } - - #[BeforeMethods(['createDatabase', 'createCollection', 'createDocuments'])] - public function benchDocumentRead() - { - $this->client->call(Client::METHOD_GET, '/databases/' . static::$databaseId . '/collections/' . static::$collectionId . '/documents/' . static::$documentId, array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - } - - #[BeforeMethods(['createDatabase', 'createCollection', 'createDocuments'])] - public function benchDocumentUpdate() - { - $this->client->call(Client::METHOD_PATCH, '/databases/' . static::$databaseId . '/collections/' . static::$collectionId . '/documents/' . static::$documentId, array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'data' => [ - 'title' => 'The Matrix Reloaded', - ], - ]); - } - - public function provideCounts(): array - { - return [ - '1 Document' => ['documents' => 1], - '10 Documents' => ['documents' => 10], - '100 Documents' => ['documents' => 100], - ]; - } - - public function createDatabase(array $params = []) - { - $database = $this->client->call(Client::METHOD_POST, '/databases', [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ], [ - 'databaseId' => ID::unique(), - 'name' => 'Test Database' - ]); - static::$databaseId = $database['body']['$id']; - } - - public function createCollection(array $params = []) - { - $collection = $this->client->call(Client::METHOD_POST, '/databases/' . static::$databaseId . '/collections', [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ], [ - 'collectionId' => ID::unique(), - 'name' => 'Movies', - 'documentSecurity' => true, - 'permissions' => [ - Permission::read(Role::user($this->getUser()['$id'])), - Permission::write(Role::user($this->getUser()['$id'])), - ], - ]); - static::$collectionId = $collection['body']['$id']; - - // Create attribute - $this->client->call(Client::METHOD_POST, '/databases/' . static::$databaseId . '/collections/' . static::$collectionId . '/attributes/string', [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ], [ - 'key' => 'title', - 'size' => 256, - 'required' => true, - ]); - - // Wait for attribute to be ready - sleep(2); - } - - public function createDocuments(array $params = []) - { - $count = $params['documents'] ?? 1; - - for ($i = 0; $i < $count; $i++) { - $response = $this->client->call(Client::METHOD_POST, '/databases/' . static::$databaseId . '/collections/' . static::$collectionId . '/documents', [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ], [ - 'documentId' => ID::unique(), - 'data' => [ - 'title' => 'Captain America' . $i, - ], - 'permissions' => [ - Permission::read(Role::user($this->getUser()['$id'])), - Permission::write(Role::user($this->getUser()['$id'])), - ] - ]); - - static::$documentId = $response['body']['$id']; - } - } -} diff --git a/tests/benchmarks/Services/Databases/DatabasesCustomClientBench.php b/tests/benchmarks/Services/Databases/DatabasesCustomClientBench.php deleted file mode 100644 index 658ddfd98..000000000 --- a/tests/benchmarks/Services/Databases/DatabasesCustomClientBench.php +++ /dev/null @@ -1,10 +0,0 @@ -client->call(Client::METHOD_POST, '/functions/' . static::$functionId . '/executions', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - } - - public function createFunction() - { - $response = $this->client->call(Client::METHOD_POST, '/functions', [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ], [ - 'functionId' => ID::unique(), - 'name' => 'Test', - 'runtime' => 'php-8.0', - 'timeout' => 10, - 'execute' => [Role::users()->toString()] - ]); - static::$functionId = $response['body']['$id']; - } - - public function prepareDeployment() - { - $stdout = ''; - $stderr = ''; - - Console::execute( - 'cd ' . realpath(__DIR__ . "/../../../resources/functions/php") . " && \ - tar --exclude code.tar.gz -czf code.tar.gz .", - '', - $stdout, - $stderr - ); - } - - public function createDeployment() - { - $code = realpath(__DIR__ . '/../../../resources/functions/php/code.tar.gz'); - - $response = $this->client->call(Client::METHOD_POST, '/functions/' . static::$functionId . '/deployments', [ - 'content-type' => 'multipart/form-data', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ], [ - 'entrypoint' => 'index.php', - 'code' => new CURLFile( - $code, - 'application/x-gzip', - \basename($code) - ), - ]); - - static::$deploymentId = $response['body']['$id']; - - while (true) { - $response = $this->client->call(Client::METHOD_GET, '/functions/' . static::$functionId . '/deployments/' . static::$deploymentId, [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ]); - - $status = $response['body']['status'] ?? ''; - - switch ($status) { - case '': - case 'processing': - case 'building': - usleep(200); - break; - case 'ready': - break 2; - case 'failed': - throw new \Exception('Failed to build function'); - } - } - - sleep(1); - } - - public function patchDeployment() - { - $this->client->call(Client::METHOD_PATCH, '/functions/' . static::$functionId . '/deployments/' . static::$deploymentId, [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'], - ], []); - } -} diff --git a/tests/benchmarks/Services/Functions/FunctionsCustomClientBench.php b/tests/benchmarks/Services/Functions/FunctionsCustomClientBench.php deleted file mode 100644 index ec5e0b8f2..000000000 --- a/tests/benchmarks/Services/Functions/FunctionsCustomClientBench.php +++ /dev/null @@ -1,10 +0,0 @@ -createDeployment(); - } -} diff --git a/tests/benchmarks/Services/Storage/Base.php b/tests/benchmarks/Services/Storage/Base.php deleted file mode 100644 index 6496490a6..000000000 --- a/tests/benchmarks/Services/Storage/Base.php +++ /dev/null @@ -1,117 +0,0 @@ -client->call(Client::METHOD_POST, '/storage/buckets/' . static::$bucketId . '/files', array_merge([ - 'content-type' => 'multipart/form-data', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'fileId' => ID::unique(), - 'permissions' => [ - Permission::read(Role::user($this->getUser()['$id'])), - Permission::write(Role::user($this->getUser()['$id'])), - ], - - 'file' => new CURLFile(realpath(__DIR__ . '/../../../resources/logo.png'), 'image/png', 'logo.png'), - ]); - } - - #[ParamProviders(['provideCounts'])] - #[BeforeMethods(['createBucket', 'createFiles'])] - public function benchFileReadList(array $params) - { - $this->client->call(Client::METHOD_GET, '/storage/buckets/' . static::$bucketId . '/files', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'queries' => ['limit(' . $params['files'] . ')'], - ]); - } - - #[BeforeMethods(['createBucket', 'createFiles'])] - public function benchFileRead() - { - $this->client->call(Client::METHOD_GET, '/storage/buckets/' . static::$bucketId . '/files/' . static::$fileId, array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - } - - #[BeforeMethods(['createBucket', 'createFiles'])] - public function benchFileUpdate() - { - $this->client->call(Client::METHOD_PUT, '/storage/buckets/' . static::$bucketId . '/files/' . static::$fileId, array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'name' => 'Updated name', - 'permissions' => [], - ]); - } - - public function provideCounts(): array - { - return [ - '10 Files' => ['files' => 10], - '100 Files' => ['files' => 100], - ]; - } - - public function createBucket(array $params = []) - { - // Create bucket - $bucket = $this->client->call(Client::METHOD_POST, '/storage/buckets', [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ], [ - 'bucketId' => ID::unique(), - 'name' => 'Test Bucket', - 'permissions' => [ - Permission::read(Role::user($this->getUser()['$id'])), - Permission::write(Role::user($this->getUser()['$id'])), - ], - 'fileSecurity' => true - ]); - static::$bucketId = $bucket['body']['$id']; - } - - public function createFiles(array $params = []) - { - $count = $params['files'] ?? 1; - - // Create files - for ($i = 0; $i < $count; $i++) { - $response = $this->client->call(Client::METHOD_POST, '/storage/buckets/' . static::$bucketId . '/files', [ - 'content-type' => 'multipart/form-data', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ], [ - 'fileId' => ID::unique(), - 'file' => new CURLFile(realpath(__DIR__ . '/../../../resources/logo.png'), 'image/png', 'logo.png'), - ]); - - static::$fileId = $response['body']['$id']; - } - } -} diff --git a/tests/benchmarks/Services/Storage/StorageCustomClientBench.php b/tests/benchmarks/Services/Storage/StorageCustomClientBench.php deleted file mode 100644 index 585182c1d..000000000 --- a/tests/benchmarks/Services/Storage/StorageCustomClientBench.php +++ /dev/null @@ -1,10 +0,0 @@ -client->call(Client::METHOD_POST, '/users', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'userId' => $id, - 'email' => 'test' . $id . '@example.com', - 'password' => 'password', - ]); - } - - #[ParamProviders(['provideCounts'])] - #[BeforeMethods(['createUsers'])] - public function benchUserReadList(array $params) - { - $this->client->call(Client::METHOD_GET, '/users', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'queries' => ['limit(' . $params['users'] . ')'], - ]); - } - - #[BeforeMethods(['createUsers'])] - public function benchUserRead() - { - $this->client->call(Client::METHOD_GET, '/users/' . static::$userId, array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); - } - - #[BeforeMethods(['createUsers'])] - public function benchUserUpdate() - { - $this->client->call(Client::METHOD_PUT, '/users/' . static::$userId, array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'name' => 'New Name', - ]); - } - - public function createUsers(array $params = []) - { - $count = $params['documents'] ?? 1; - - for ($i = 0; $i < $count; $i++) { - $id = ID::unique(); - - $response = $this->client->call(Client::METHOD_POST, '/users', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'userId' => $id, - 'email' => 'test' . $id . '@example.com', - 'password' => 'password', - ]); - - static::$userId = $response['body']['$id']; - } - } - - public function provideCounts(): array - { - return [ - '1 User' => ['users' => 1], - '10 Users' => ['users' => 10], - '100 Users' => ['users' => 100], - ]; - } -} diff --git a/tests/benchmarks/http.js b/tests/benchmarks/http.js new file mode 100644 index 000000000..799c8fb23 --- /dev/null +++ b/tests/benchmarks/http.js @@ -0,0 +1,34 @@ +import http from 'k6/http'; +import { check } from 'k6'; +import { Counter } from 'k6/metrics'; + +// A simple counter for http requests +export const requests = new Counter('http_reqs'); + +// you can specify stages of your test (ramp up/down patterns) through the options object +// target is the number of VUs you are aiming for + +export const options = { + stages: [ + { target: 50, duration: '1m' }, + // { target: 15, duration: '1m' }, + // { target: 0, duration: '1m' }, + ], + thresholds: { + requests: ['count < 100'], + }, +}; + +export default function () { + const config = { + headers: { + 'X-Appwrite-Key': '24356eb021863f81eb7dd77c7750304d0464e141cad6e9a8befa1f7d2b066fde190df3dab1e8d2639dbb82ee848da30501424923f4cd80d887ee40ad77ded62763ee489448523f6e39667f290f9a54b2ab8fad131a0bc985e6c0f760015f7f3411e40626c75646bb19d2bb2f7bf2f63130918220a206758cbc48845fd725a695', + 'X-Appwrite-Project': '60479fe35d95d' + }} + + const resDb = http.get('http://localhost:9501/', config); + + check(resDb, { + 'status is 200': (r) => r.status === 200, + }); +} \ No newline at end of file diff --git a/tests/benchmarks/ws.js b/tests/benchmarks/ws.js new file mode 100644 index 000000000..916458856 --- /dev/null +++ b/tests/benchmarks/ws.js @@ -0,0 +1,59 @@ +// k6 run tests/benchmarks/ws.js + +import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'; +import ws from 'k6/ws'; +import { check } from 'k6'; + +export let options = { + stages: [ + { + duration: '10s', + target: 500 + }, + { + duration: '1m', + target: 500 + }, + ], +} + +export default function () { + // const url = new URL('wss://appwrite-realtime.monitor-api.com/v1/realtime'); + // url.searchParams.append('project', '604249e6b1a9f'); + const url = new URL('ws://localhost/v1/realtime'); + url.searchParams.append('project', 'console'); + url.searchParams.append('channels[]', 'files'); + + const res = ws.connect(url.toString(), function (socket) { + let connection = false; + let checked = false; + let payload = null; + socket.on('open', () => { + connection = true; + }); + + socket.on('message', (data) => { + payload = data; + checked = true; + }); + + socket.setTimeout(function () { + check(payload, { + 'connection opened': (r) => connection, + 'message received': (r) => checked, + 'channels are right': (r) => r === JSON.stringify({ + "type": "connected", + "data": { + "channels": [ + "files" + ], + "user": null + } + }) + }) + socket.close(); + }, 5000); + }); + + check(res, { 'status is 101': (r) => r && r.status === 101 }); +} \ No newline at end of file From bddbc15f1a7aaf545a0f5d45a7108bf171eb3267 Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 31 Jan 2023 17:02:22 +0200 Subject: [PATCH 59/94] removed some unnecessary files --- .env | 2 +- tests/e2e/General/AbuseTest.php | 2 +- tests/e2e/Scopes/Scope.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.env b/.env index 364079336..c76f4b779 100644 --- a/.env +++ b/.env @@ -52,7 +52,7 @@ _APP_FUNCTIONS_CPUS=1 _APP_FUNCTIONS_MEMORY=512 _APP_FUNCTIONS_INACTIVE_THRESHOLD=600 _APP_FUNCTIONS_MAINTENANCE_INTERVAL=600 -_APP_FUNCTIONS_RUNTIMES_NETWORK=openruntimes-runtimes +_APP_FUNCTIONS_RUNTIMES_NETWORK=runtimes _APP_EXECUTOR_SECRET=your-secret-key _APP_EXECUTOR_HOST=http://exc1/v1 _APP_FUNCTIONS_RUNTIMES= diff --git a/tests/e2e/General/AbuseTest.php b/tests/e2e/General/AbuseTest.php index 0db8ce04d..90a4b3380 100644 --- a/tests/e2e/General/AbuseTest.php +++ b/tests/e2e/General/AbuseTest.php @@ -17,7 +17,7 @@ class AbuseTest extends Scope use ProjectCustom; use SideNone; - public function setUp(): void + protected function setUp(): void { parent::setUp(); diff --git a/tests/e2e/Scopes/Scope.php b/tests/e2e/Scopes/Scope.php index 1858e41b8..2a9f20527 100644 --- a/tests/e2e/Scopes/Scope.php +++ b/tests/e2e/Scopes/Scope.php @@ -21,7 +21,7 @@ abstract class Scope extends TestCase */ protected $endpoint = 'http://localhost/v1'; - public function setUp(): void + protected function setUp(): void { $this->client = new Client(); @@ -30,7 +30,7 @@ abstract class Scope extends TestCase ; } - public function tearDown(): void + protected function tearDown(): void { $this->client = null; } From 79f3ea0f2d86e6c91607970e6ea601d56438d137 Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 31 Jan 2023 17:11:00 +0200 Subject: [PATCH 60/94] removed some unnecessary files --- composer.lock | 6489 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 6489 insertions(+) create mode 100644 composer.lock diff --git a/composer.lock b/composer.lock new file mode 100644 index 000000000..510bee803 --- /dev/null +++ b/composer.lock @@ -0,0 +1,6489 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "a38abc1452cd5f641e1cabfeeb41b524", + "packages": [ + { + "name": "adhocore/jwt", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/adhocore/php-jwt.git", + "reference": "6c434af7170090bb7a8880d2bc220a2254ba7899" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/adhocore/php-jwt/zipball/6c434af7170090bb7a8880d2bc220a2254ba7899", + "reference": "6c434af7170090bb7a8880d2bc220a2254ba7899", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.5 || ^7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ahc\\Jwt\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jitendra Adhikari", + "email": "jiten.adhikary@gmail.com" + } + ], + "description": "Ultra lightweight JSON web token (JWT) library for PHP5.5+.", + "keywords": [ + "auth", + "json-web-token", + "jwt", + "jwt-auth", + "jwt-php", + "token" + ], + "support": { + "issues": "https://github.com/adhocore/php-jwt/issues", + "source": "https://github.com/adhocore/php-jwt/tree/1.1.2" + }, + "funding": [ + { + "url": "https://paypal.me/ji10", + "type": "custom" + } + ], + "time": "2021-02-20T09:56:44+00:00" + }, + { + "name": "appwrite/php-clamav", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/appwrite/php-clamav.git", + "reference": "61d00f24f9e7766fbba233e7b8d09c5475388073" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/appwrite/php-clamav/zipball/61d00f24f9e7766fbba233e7b8d09c5475388073", + "reference": "61d00f24f9e7766fbba233e7b8d09c5475388073", + "shasum": "" + }, + "require": { + "ext-sockets": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Appwrite\\ClamAV\\": "src/ClamAV" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "ClamAV network and pipe client for PHP", + "keywords": [ + "anti virus", + "appwrite", + "clamav", + "php" + ], + "support": { + "issues": "https://github.com/appwrite/php-clamav/issues", + "source": "https://github.com/appwrite/php-clamav/tree/1.1.0" + }, + "time": "2020-10-02T05:23:46+00:00" + }, + { + "name": "appwrite/php-runtimes", + "version": "0.11.1", + "source": { + "type": "git", + "url": "https://github.com/appwrite/runtimes.git", + "reference": "9d74a477ba3333cbcfac565c46fcf19606b7b603" + }, + "require": { + "php": ">=8.0", + "utopia-php/system": "0.6.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Appwrite\\Runtimes\\": "src/Runtimes" + } + }, + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Torsten Dittmann", + "email": "torsten@appwrite.io" + } + ], + "description": "Appwrite repository for Cloud Function runtimes that contains the configurations and tests for all of the Appwrite runtime environments.", + "keywords": [ + "appwrite", + "php", + "runtimes" + ], + "time": "2022-11-07T16:45:52+00:00" + }, + { + "name": "chillerlan/php-qrcode", + "version": "4.3.3", + "source": { + "type": "git", + "url": "https://github.com/chillerlan/php-qrcode.git", + "reference": "6356b246948ac1025882b3f55e7c68ebd4515ae3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/6356b246948ac1025882b3f55e7c68ebd4515ae3", + "reference": "6356b246948ac1025882b3f55e7c68ebd4515ae3", + "shasum": "" + }, + "require": { + "chillerlan/php-settings-container": "^2.1", + "ext-mbstring": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phan/phan": "^5.3", + "phpunit/phpunit": "^9.5", + "setasign/fpdf": "^1.8.2" + }, + "suggest": { + "chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.", + "setasign/fpdf": "Required to use the QR FPDF output." + }, + "type": "library", + "autoload": { + "psr-4": { + "chillerlan\\QRCode\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kazuhiko Arase", + "homepage": "https://github.com/kazuhikoarase" + }, + { + "name": "Smiley", + "email": "smiley@chillerlan.net", + "homepage": "https://github.com/codemasher" + }, + { + "name": "Contributors", + "homepage": "https://github.com/chillerlan/php-qrcode/graphs/contributors" + } + ], + "description": "A QR code generator. PHP 7.4+", + "homepage": "https://github.com/chillerlan/php-qrcode", + "keywords": [ + "phpqrcode", + "qr", + "qr code", + "qrcode", + "qrcode-generator" + ], + "support": { + "issues": "https://github.com/chillerlan/php-qrcode/issues", + "source": "https://github.com/chillerlan/php-qrcode/tree/4.3.3" + }, + "funding": [ + { + "url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", + "type": "custom" + }, + { + "url": "https://ko-fi.com/codemasher", + "type": "ko_fi" + } + ], + "time": "2021-11-25T22:38:09+00:00" + }, + { + "name": "chillerlan/php-settings-container", + "version": "2.1.4", + "source": { + "type": "git", + "url": "https://github.com/chillerlan/php-settings-container.git", + "reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/1beb7df3c14346d4344b0b2e12f6f9a74feabd4a", + "reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phan/phan": "^5.3", + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "chillerlan\\Settings\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Smiley", + "email": "smiley@chillerlan.net", + "homepage": "https://github.com/codemasher" + } + ], + "description": "A container class for immutable settings objects. Not a DI container. PHP 7.4+", + "homepage": "https://github.com/chillerlan/php-settings-container", + "keywords": [ + "PHP7", + "Settings", + "configuration", + "container", + "helper" + ], + "support": { + "issues": "https://github.com/chillerlan/php-settings-container/issues", + "source": "https://github.com/chillerlan/php-settings-container" + }, + "funding": [ + { + "url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", + "type": "custom" + }, + { + "url": "https://ko-fi.com/codemasher", + "type": "ko_fi" + } + ], + "time": "2022-07-05T22:32:14+00:00" + }, + { + "name": "colinmollenhour/credis", + "version": "v1.14.0", + "source": { + "type": "git", + "url": "https://github.com/colinmollenhour/credis.git", + "reference": "dccc8a46586475075fbb012d8bd523b8a938c2dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/dccc8a46586475075fbb012d8bd523b8a938c2dc", + "reference": "dccc8a46586475075fbb012d8bd523b8a938c2dc", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "suggest": { + "ext-redis": "Improved performance for communicating with redis" + }, + "type": "library", + "autoload": { + "classmap": [ + "Client.php", + "Cluster.php", + "Sentinel.php", + "Module.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Colin Mollenhour", + "email": "colin@mollenhour.com" + } + ], + "description": "Credis is a lightweight interface to the Redis key-value store which wraps the phpredis library when available for better performance.", + "homepage": "https://github.com/colinmollenhour/credis", + "support": { + "issues": "https://github.com/colinmollenhour/credis/issues", + "source": "https://github.com/colinmollenhour/credis/tree/v1.14.0" + }, + "time": "2022-11-09T01:18:39+00:00" + }, + { + "name": "composer/package-versions-deprecated", + "version": "1.11.99.5", + "source": { + "type": "git", + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0", + "php": "^7 || ^8" + }, + "replace": { + "ocramius/package-versions": "1.11.99" + }, + "require-dev": { + "composer/composer": "^1.9.3 || ^2.0@dev", + "ext-zip": "^1.13", + "phpunit/phpunit": "^6.5 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "support": { + "issues": "https://github.com/composer/package-versions-deprecated/issues", + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-01-17T14:14:24+00:00" + }, + { + "name": "dragonmantank/cron-expression", + "version": "v3.3.1", + "source": { + "type": "git", + "url": "https://github.com/dragonmantank/cron-expression.git", + "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/be85b3f05b46c39bbc0d95f6c071ddff669510fa", + "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0", + "webmozart/assert": "^1.0" + }, + "replace": { + "mtdowling/cron-expression": "^1.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-webmozart-assert": "^1.0", + "phpunit/phpunit": "^7.0|^8.0|^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Cron\\": "src/Cron/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Tankersley", + "email": "chris@ctankersley.com", + "homepage": "https://github.com/dragonmantank" + } + ], + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": [ + "cron", + "schedule" + ], + "support": { + "issues": "https://github.com/dragonmantank/cron-expression/issues", + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.1" + }, + "funding": [ + { + "url": "https://github.com/dragonmantank", + "type": "github" + } + ], + "time": "2022-01-18T15:43:28+00:00" + }, + { + "name": "jean85/pretty-package-versions", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/Jean85/pretty-package-versions.git", + "reference": "1e0104b46f045868f11942aea058cd7186d6c303" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/1e0104b46f045868f11942aea058cd7186d6c303", + "reference": "1e0104b46f045868f11942aea058cd7186d6c303", + "shasum": "" + }, + "require": { + "composer/package-versions-deprecated": "^1.8.0", + "php": "^7.0|^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0|^8.5|^9.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Jean85\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alessandro Lai", + "email": "alessandro.lai85@gmail.com" + } + ], + "description": "A wrapper for ocramius/package-versions to get pretty versions strings", + "keywords": [ + "composer", + "package", + "release", + "versions" + ], + "support": { + "issues": "https://github.com/Jean85/pretty-package-versions/issues", + "source": "https://github.com/Jean85/pretty-package-versions/tree/1.6.0" + }, + "time": "2021-02-04T16:20:16+00:00" + }, + { + "name": "laravel/pint", + "version": "v1.2.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/pint.git", + "reference": "e60e2112ee779ce60f253695b273d1646a17d6f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/pint/zipball/e60e2112ee779ce60f253695b273d1646a17d6f1", + "reference": "e60e2112ee779ce60f253695b273d1646a17d6f1", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "ext-tokenizer": "*", + "ext-xml": "*", + "php": "^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.11.0", + "illuminate/view": "^9.32.0", + "laravel-zero/framework": "^9.2.0", + "mockery/mockery": "^1.5.1", + "nunomaduro/larastan": "^2.2.0", + "nunomaduro/termwind": "^1.14.0", + "pestphp/pest": "^1.22.1" + }, + "bin": [ + "builds/pint" + ], + "type": "project", + "autoload": { + "psr-4": { + "App\\": "app/", + "Database\\Seeders\\": "database/seeders/", + "Database\\Factories\\": "database/factories/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "An opinionated code formatter for PHP.", + "homepage": "https://laravel.com", + "keywords": [ + "format", + "formatter", + "lint", + "linter", + "php" + ], + "support": { + "issues": "https://github.com/laravel/pint/issues", + "source": "https://github.com/laravel/pint" + }, + "time": "2022-11-29T16:25:20+00:00" + }, + { + "name": "matomo/device-detector", + "version": "6.0.0", + "source": { + "type": "git", + "url": "https://github.com/matomo-org/device-detector.git", + "reference": "7fc2af3af62bd69e6e3404d561e371a83c112be9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/matomo-org/device-detector/zipball/7fc2af3af62bd69e6e3404d561e371a83c112be9", + "reference": "7fc2af3af62bd69e6e3404d561e371a83c112be9", + "shasum": "" + }, + "require": { + "mustangostang/spyc": "*", + "php": "^7.2|^8.0" + }, + "replace": { + "piwik/device-detector": "self.version" + }, + "require-dev": { + "matthiasmullie/scrapbook": "^1.4.7", + "mayflower/mo4-coding-standard": "^v8.0.0", + "phpstan/phpstan": "^0.12.52", + "phpunit/phpunit": "^8.5.8", + "psr/cache": "^1.0.1", + "psr/simple-cache": "^1.0.1", + "symfony/yaml": "^5.1.7" + }, + "suggest": { + "doctrine/cache": "Can directly be used for caching purpose", + "ext-yaml": "Necessary for using the Pecl YAML parser" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeviceDetector\\": "" + }, + "exclude-from-classmap": [ + "Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "The Matomo Team", + "email": "hello@matomo.org", + "homepage": "https://matomo.org/team/" + } + ], + "description": "The Universal Device Detection library, that parses User Agents and detects devices (desktop, tablet, mobile, tv, cars, console, etc.), clients (browsers, media players, mobile apps, feed readers, libraries, etc), operating systems, devices, brands and models.", + "homepage": "https://matomo.org", + "keywords": [ + "devicedetection", + "parser", + "useragent" + ], + "support": { + "forum": "https://forum.matomo.org/", + "issues": "https://github.com/matomo-org/device-detector/issues", + "source": "https://github.com/matomo-org/matomo", + "wiki": "https://dev.matomo.org/" + }, + "time": "2022-04-11T09:58:17+00:00" + }, + { + "name": "mongodb/mongodb", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/mongodb/mongo-php-library.git", + "reference": "953dbc19443aa9314c44b7217a16873347e6840d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/953dbc19443aa9314c44b7217a16873347e6840d", + "reference": "953dbc19443aa9314c44b7217a16873347e6840d", + "shasum": "" + }, + "require": { + "ext-hash": "*", + "ext-json": "*", + "ext-mongodb": "^1.8.1", + "jean85/pretty-package-versions": "^1.2", + "php": "^7.0 || ^8.0", + "symfony/polyfill-php80": "^1.19" + }, + "require-dev": { + "squizlabs/php_codesniffer": "^3.5, <3.5.5", + "symfony/phpunit-bridge": "5.x-dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "MongoDB\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Andreas Braun", + "email": "andreas.braun@mongodb.com" + }, + { + "name": "Jeremy Mikola", + "email": "jmikola@gmail.com" + } + ], + "description": "MongoDB driver library", + "homepage": "https://jira.mongodb.org/browse/PHPLIB", + "keywords": [ + "database", + "driver", + "mongodb", + "persistence" + ], + "support": { + "issues": "https://github.com/mongodb/mongo-php-library/issues", + "source": "https://github.com/mongodb/mongo-php-library/tree/1.8.0" + }, + "time": "2020-11-25T12:26:02+00:00" + }, + { + "name": "mustangostang/spyc", + "version": "0.6.3", + "source": { + "type": "git", + "url": "git@github.com:mustangostang/spyc.git", + "reference": "4627c838b16550b666d15aeae1e5289dd5b77da0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mustangostang/spyc/zipball/4627c838b16550b666d15aeae1e5289dd5b77da0", + "reference": "4627c838b16550b666d15aeae1e5289dd5b77da0", + "shasum": "" + }, + "require": { + "php": ">=5.3.1" + }, + "require-dev": { + "phpunit/phpunit": "4.3.*@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.5.x-dev" + } + }, + "autoload": { + "files": [ + "Spyc.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "mustangostang", + "email": "vlad.andersen@gmail.com" + } + ], + "description": "A simple YAML loader/dumper class for PHP", + "homepage": "https://github.com/mustangostang/spyc/", + "keywords": [ + "spyc", + "yaml", + "yml" + ], + "time": "2019-09-10T13:16:29+00:00" + }, + { + "name": "phpmailer/phpmailer", + "version": "v6.6.0", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e43bac82edc26ca04b36143a48bde1c051cfd5b1", + "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-filter": "*", + "ext-hash": "*", + "php": ">=5.5.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "doctrine/annotations": "^1.2", + "php-parallel-lint/php-console-highlighter": "^0.5.0", + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.3.5", + "roave/security-advisories": "dev-latest", + "squizlabs/php_codesniffer": "^3.6.2", + "yoast/phpunit-polyfills": "^1.0.0" + }, + "suggest": { + "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-only" + ], + "authors": [ + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "support": { + "issues": "https://github.com/PHPMailer/PHPMailer/issues", + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.0" + }, + "funding": [ + { + "url": "https://github.com/Synchro", + "type": "github" + } + ], + "time": "2022-02-28T15:31:21+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "resque/php-resque", + "version": "v1.3.6", + "source": { + "type": "git", + "url": "https://github.com/resque/php-resque.git", + "reference": "fe41c04763699b1318d97ed14cc78583e9380161" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/resque/php-resque/zipball/fe41c04763699b1318d97ed14cc78583e9380161", + "reference": "fe41c04763699b1318d97ed14cc78583e9380161", + "shasum": "" + }, + "require": { + "colinmollenhour/credis": "~1.7", + "php": ">=5.6.0", + "psr/log": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "suggest": { + "ext-pcntl": "REQUIRED for forking processes on platforms that support it (so anything but Windows).", + "ext-proctitle": "Allows php-resque to rename the title of UNIX processes to show the status of a worker.", + "ext-redis": "Native PHP extension for Redis connectivity. Credis will automatically utilize when available." + }, + "bin": [ + "bin/resque", + "bin/resque-scheduler" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Resque": "lib", + "ResqueScheduler": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dan Hunsaker", + "email": "danhunsaker+resque@gmail.com", + "role": "Maintainer" + }, + { + "name": "Rajib Ahmed", + "homepage": "https://github.com/rajibahmed", + "role": "Maintainer" + }, + { + "name": "Steve Klabnik", + "email": "steve@steveklabnik.com", + "role": "Maintainer" + }, + { + "name": "Chris Boulton", + "email": "chris@bigcommerce.com", + "role": "Creator" + } + ], + "description": "Redis backed library for creating background jobs and processing them later. Based on resque for Ruby.", + "homepage": "http://www.github.com/resque/php-resque/", + "keywords": [ + "background", + "job", + "redis", + "resque" + ], + "support": { + "issues": "https://github.com/resque/php-resque/issues", + "source": "https://github.com/resque/php-resque/tree/v1.3.6" + }, + "time": "2020-04-16T16:39:50+00:00" + }, + { + "name": "slickdeals/statsd", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/Slickdeals/statsd-php.git", + "reference": "225588a0a079e145359049f6e5e23eedb1b4c17f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Slickdeals/statsd-php/zipball/225588a0a079e145359049f6e5e23eedb1b4c17f", + "reference": "225588a0a079e145359049f6e5e23eedb1b4c17f", + "shasum": "" + }, + "require": { + "php": ">= 7.3 || ^8" + }, + "replace": { + "domnikl/statsd": "self.version" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.0", + "phpunit/phpunit": "^9", + "vimeo/psalm": "^4.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Domnikl\\Statsd\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dominik Liebler", + "email": "liebler.dominik@gmail.com" + } + ], + "description": "a PHP client for statsd", + "homepage": "https://github.com/Slickdeals/statsd-php", + "keywords": [ + "Metrics", + "monitoring", + "statistics", + "statsd", + "udp" + ], + "support": { + "issues": "https://github.com/Slickdeals/statsd-php/issues", + "source": "https://github.com/Slickdeals/statsd-php/tree/3.1.0" + }, + "time": "2021-06-04T20:33:46+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "utopia-php/abuse", + "version": "0.16.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/abuse.git", + "reference": "6370d9150425460416583feba0990504ac789e98" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/abuse/zipball/6370d9150425460416583feba0990504ac789e98", + "reference": "6370d9150425460416583feba0990504ac789e98", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-pdo": "*", + "php": ">=8.0", + "utopia-php/database": "0.28.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.4", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Abuse\\": "src/Abuse" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple abuse library to manage application usage limits", + "keywords": [ + "Abuse", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/abuse/issues", + "source": "https://github.com/utopia-php/abuse/tree/0.16.0" + }, + "time": "2022-10-31T14:46:41+00:00" + }, + { + "name": "utopia-php/analytics", + "version": "0.2.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/analytics.git", + "reference": "adfc2d057a7f6ab618a77c8a20ed3e35485ff416" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/analytics/zipball/adfc2d057a7f6ab618a77c8a20ed3e35485ff416", + "reference": "adfc2d057a7f6ab618a77c8a20ed3e35485ff416", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Analytics\\": "src/Analytics" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Torsten Dittmann", + "email": "torsten@appwrite.io" + } + ], + "description": "A simple library to track events & users.", + "keywords": [ + "analytics", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/analytics/issues", + "source": "https://github.com/utopia-php/analytics/tree/0.2.0" + }, + "time": "2021-03-23T21:33:07+00:00" + }, + { + "name": "utopia-php/audit", + "version": "0.17.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/audit.git", + "reference": "455471bd4de8d74026809e843f8c9740eb32922c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/audit/zipball/455471bd4de8d74026809e843f8c9740eb32922c", + "reference": "455471bd4de8d74026809e843f8c9740eb32922c", + "shasum": "" + }, + "require": { + "ext-pdo": "*", + "php": ">=8.0", + "utopia-php/database": "0.28.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Audit\\": "src/Audit" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A simple audit library to manage application users logs", + "keywords": [ + "Audit", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/audit/issues", + "source": "https://github.com/utopia-php/audit/tree/0.17.0" + }, + "time": "2022-10-31T14:44:52+00:00" + }, + { + "name": "utopia-php/cache", + "version": "0.8.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/cache.git", + "reference": "212e66100a1f32e674fca5d9bc317cc998303089" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/cache/zipball/212e66100a1f32e674fca5d9bc317cc998303089", + "reference": "212e66100a1f32e674fca5d9bc317cc998303089", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-memcached": "*", + "ext-redis": "*", + "php": ">=8.0" + }, + "require-dev": { + "laravel/pint": "1.2.*", + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.13.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Cache\\": "src/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A simple cache library to manage application cache storing, loading and purging", + "keywords": [ + "cache", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/cache/issues", + "source": "https://github.com/utopia-php/cache/tree/0.8.0" + }, + "time": "2022-10-16T16:48:09+00:00" + }, + { + "name": "utopia-php/cli", + "version": "0.14.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/cli.git", + "reference": "c30ef985a4e739758a0d95eb0706b357b6d8c086" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/cli/zipball/c30ef985a4e739758a0d95eb0706b357b6d8c086", + "reference": "c30ef985a4e739758a0d95eb0706b357b6d8c086", + "shasum": "" + }, + "require": { + "php": ">=7.4", + "utopia-php/framework": "0.*.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "squizlabs/php_codesniffer": "^3.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\CLI\\": "src/CLI" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple CLI library to manage command line applications", + "keywords": [ + "cli", + "command line", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/cli/issues", + "source": "https://github.com/utopia-php/cli/tree/0.14.0" + }, + "time": "2022-10-09T10:19:07+00:00" + }, + { + "name": "utopia-php/config", + "version": "0.2.2", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/config.git", + "reference": "a3d7bc0312d7150d5e04b1362dc34b2b136908cc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/config/zipball/a3d7bc0312d7150d5e04b1362dc34b2b136908cc", + "reference": "a3d7bc0312d7150d5e04b1362dc34b2b136908cc", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Config\\": "src/Config" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple Config library to managing application config variables", + "keywords": [ + "config", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/config/issues", + "source": "https://github.com/utopia-php/config/tree/0.2.2" + }, + "time": "2020-10-24T09:49:09+00:00" + }, + { + "name": "utopia-php/database", + "version": "dev-increment", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/database.git", + "reference": "fc0a8bfc9826e1e64521a8e7a95904f9a999d6fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/database/zipball/fc0a8bfc9826e1e64521a8e7a95904f9a999d6fb", + "reference": "fc0a8bfc9826e1e64521a8e7a95904f9a999d6fb", + "shasum": "" + }, + "require": { + "ext-pdo": "*", + "php": ">=8.0", + "utopia-php/cache": "0.8.*", + "utopia-php/framework": "0.*.*", + "utopia-php/mongo": "0.0.2" + }, + "require-dev": { + "ext-mongodb": "*", + "ext-redis": "*", + "fakerphp/faker": "^1.14", + "mongodb/mongodb": "1.8.0", + "phpunit/phpunit": "^9.4", + "swoole/ide-helper": "4.8.0", + "utopia-php/cli": "^0.11.0", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Database\\": "src/Database" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A simple library to manage application persistency using multiple database adapters", + "keywords": [ + "database", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/database/issues", + "source": "https://github.com/utopia-php/database/tree/increment" + }, + "time": "2022-12-08T08:59:37+00:00" + }, + { + "name": "utopia-php/domains", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/domains.git", + "reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/domains/zipball/1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73", + "reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Domains\\": "src/Domains" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "Utopia Domains library is simple and lite library for parsing web domains. This library is aiming to be as simple and easy to learn and use.", + "keywords": [ + "domains", + "framework", + "icann", + "php", + "public suffix", + "tld", + "tld extract", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/domains/issues", + "source": "https://github.com/utopia-php/domains/tree/master" + }, + "time": "2020-02-23T07:40:02+00:00" + }, + { + "name": "utopia-php/dsn", + "version": "0.1.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/dsn.git", + "reference": "17a5935eab1b89fb4b95600db50a1b6d5faa6cea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/dsn/zipball/17a5935eab1b89fb4b95600db50a1b6d5faa6cea", + "reference": "17a5935eab1b89fb4b95600db50a1b6d5faa6cea", + "shasum": "" + }, + "require": { + "php": ">=8.0" + }, + "require-dev": { + "laravel/pint": "1.2.*", + "phpunit/phpunit": "^9.3", + "squizlabs/php_codesniffer": "^3.6", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\DSN\\": "src/DSN" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A simple library for parsing and managing Data Source Names ( DSNs )", + "keywords": [ + "dsn", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/dsn/issues", + "source": "https://github.com/utopia-php/dsn/tree/0.1.0" + }, + "time": "2022-10-26T10:06:20+00:00" + }, + { + "name": "utopia-php/framework", + "version": "0.25.1", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/framework.git", + "reference": "2391b397135586b2100d39e338827bef8d2f4ad0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/2391b397135586b2100d39e338827bef8d2f4ad0", + "reference": "2391b397135586b2100d39e338827bef8d2f4ad0", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "require-dev": { + "laravel/pint": "^1.2", + "phpunit/phpunit": "^9.5.25", + "vimeo/psalm": "4.27.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A simple, light and advanced PHP framework", + "keywords": [ + "framework", + "php", + "upf" + ], + "support": { + "issues": "https://github.com/utopia-php/framework/issues", + "source": "https://github.com/utopia-php/framework/tree/0.25.1" + }, + "time": "2022-11-23T18:22:23+00:00" + }, + { + "name": "utopia-php/image", + "version": "0.5.4", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/image.git", + "reference": "ca5f436f9aa22dedaa6648f24f3687733808e336" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/image/zipball/ca5f436f9aa22dedaa6648f24f3687733808e336", + "reference": "ca5f436f9aa22dedaa6648f24f3687733808e336", + "shasum": "" + }, + "require": { + "ext-imagick": "*", + "php": ">=8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.13.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Image\\": "src/Image" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple Image manipulation library", + "keywords": [ + "framework", + "image", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/image/issues", + "source": "https://github.com/utopia-php/image/tree/0.5.4" + }, + "time": "2022-05-11T12:30:41+00:00" + }, + { + "name": "utopia-php/locale", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/locale.git", + "reference": "c2d9358d0fe2f6b6ed5448369f9d1e430c615447" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/locale/zipball/c2d9358d0fe2f6b6ed5448369f9d1e430c615447", + "reference": "c2d9358d0fe2f6b6ed5448369f9d1e430c615447", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Locale\\": "src/Locale" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple locale library to manage application translations", + "keywords": [ + "framework", + "locale", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/locale/issues", + "source": "https://github.com/utopia-php/locale/tree/0.4.0" + }, + "time": "2021-07-24T11:35:55+00:00" + }, + { + "name": "utopia-php/logger", + "version": "0.3.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/logger.git", + "reference": "079656cb5169ca9600861eda0b6819199e3d4a57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/logger/zipball/079656cb5169ca9600861eda0b6819199e3d4a57", + "reference": "079656cb5169ca9600861eda0b6819199e3d4a57", + "shasum": "" + }, + "require": { + "php": ">=8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Logger\\": "src/Logger" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Matej Bačo", + "email": "matej@appwrite.io" + }, + { + "name": "Christy Jacob", + "email": "christy@appwrite.io" + } + ], + "description": "Utopia Logger library is simple and lite library for logging information, such as errors or warnings. This library is aiming to be as simple and easy to learn and use.", + "keywords": [ + "appsignal", + "errors", + "framework", + "logger", + "logging", + "logs", + "php", + "raygun", + "sentry", + "upf", + "utopia", + "warnings" + ], + "support": { + "issues": "https://github.com/utopia-php/logger/issues", + "source": "https://github.com/utopia-php/logger/tree/0.3.0" + }, + "time": "2022-03-18T10:56:57+00:00" + }, + { + "name": "utopia-php/messaging", + "version": "0.1.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/messaging.git", + "reference": "501272fad666f06bec8f130076862e7981a73f8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/messaging/zipball/501272fad666f06bec8f130076862e7981a73f8c", + "reference": "501272fad666f06bec8f130076862e7981a73f8c", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=8.0.0" + }, + "require-dev": { + "phpmailer/phpmailer": "6.6.*", + "phpunit/phpunit": "9.5.*", + "squizlabs/php_codesniffer": "^3.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Messaging\\": "src/Utopia/Messaging" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jake Barnby", + "email": "jake@appwrite.io" + } + ], + "description": "A simple, light and advanced PHP messaging library", + "keywords": [ + "library", + "messaging", + "php", + "upf", + "utopia", + "utopia-php" + ], + "support": { + "issues": "https://github.com/utopia-php/messaging/issues", + "source": "https://github.com/utopia-php/messaging/tree/0.1.0" + }, + "time": "2022-09-29T11:22:48+00:00" + }, + { + "name": "utopia-php/mongo", + "version": "0.0.2", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/mongo.git", + "reference": "62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/mongo/zipball/62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e", + "reference": "62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e", + "shasum": "" + }, + "require": { + "ext-mongodb": "*", + "mongodb/mongodb": "1.8.0", + "php": ">=8.0" + }, + "require-dev": { + "fakerphp/faker": "^1.14", + "laravel/pint": "1.2.*", + "phpstan/phpstan": "1.8.*", + "phpunit/phpunit": "^9.4", + "swoole/ide-helper": "4.8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Mongo\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Wess", + "email": "wess@appwrite.io" + } + ], + "description": "A simple library to manage Mongo database", + "keywords": [ + "database", + "mongo", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/mongo/issues", + "source": "https://github.com/utopia-php/mongo/tree/0.0.2" + }, + "time": "2022-11-08T11:58:46+00:00" + }, + { + "name": "utopia-php/orchestration", + "version": "0.9.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/orchestration.git", + "reference": "1d4f66684b8c4927f31b695817eae6d84aafd172" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/orchestration/zipball/1d4f66684b8c4927f31b695817eae6d84aafd172", + "reference": "1d4f66684b8c4927f31b695817eae6d84aafd172", + "shasum": "" + }, + "require": { + "php": ">=8.0", + "utopia-php/cli": "0.14.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Orchestration\\": "src/Orchestration" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Lite & fast micro PHP abstraction library for container orchestration", + "keywords": [ + "docker", + "framework", + "kubernetes", + "orchestration", + "php", + "swarm", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/orchestration/issues", + "source": "https://github.com/utopia-php/orchestration/tree/0.9.0" + }, + "time": "2022-11-09T17:38:00+00:00" + }, + { + "name": "utopia-php/platform", + "version": "0.3.1", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/platform.git", + "reference": "fe9f64420957dc8fb6201d22b499572f021411e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/platform/zipball/fe9f64420957dc8fb6201d22b499572f021411e4", + "reference": "fe9f64420957dc8fb6201d22b499572f021411e4", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-redis": "*", + "php": ">=8.0", + "utopia-php/cli": "0.14.*", + "utopia-php/framework": "0.25.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "squizlabs/php_codesniffer": "^3.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Platform\\": "src/Platform" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Light and Fast Platform Library", + "keywords": [ + "cache", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/platform/issues", + "source": "https://github.com/utopia-php/platform/tree/0.3.1" + }, + "time": "2022-11-10T07:04:24+00:00" + }, + { + "name": "utopia-php/pools", + "version": "0.4.2", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/pools.git", + "reference": "d2870ab74b31b7f4027799f082e85122154f8bed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/pools/zipball/d2870ab74b31b7f4027799f082e85122154f8bed", + "reference": "d2870ab74b31b7f4027799f082e85122154f8bed", + "shasum": "" + }, + "require": { + "php": ">=8.0" + }, + "require-dev": { + "laravel/pint": "1.2.*", + "phpstan/phpstan": "1.8.*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Pools\\": "src/Pools" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Team Appwrite", + "email": "team@appwrite.io" + } + ], + "description": "A simple library to manage connection pools", + "keywords": [ + "framework", + "php", + "pools", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/pools/issues", + "source": "https://github.com/utopia-php/pools/tree/0.4.2" + }, + "time": "2022-11-22T07:55:45+00:00" + }, + { + "name": "utopia-php/preloader", + "version": "0.2.4", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/preloader.git", + "reference": "65ef48392e72172f584b0baa2e224f9a1cebcce0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/preloader/zipball/65ef48392e72172f584b0baa2e224f9a1cebcce0", + "reference": "65ef48392e72172f584b0baa2e224f9a1cebcce0", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Preloader\\": "src/Preloader" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "team@appwrite.io" + } + ], + "description": "Utopia Preloader library is simple and lite library for managing PHP preloading configuration", + "keywords": [ + "framework", + "php", + "preload", + "preloader", + "preloading", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/preloader/issues", + "source": "https://github.com/utopia-php/preloader/tree/0.2.4" + }, + "time": "2020-10-24T07:04:59+00:00" + }, + { + "name": "utopia-php/queue", + "version": "0.5.1", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/queue.git", + "reference": "4b39e1f232b2e619b0d7fb4004f2356df334ddc1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/queue/zipball/4b39e1f232b2e619b0d7fb4004f2356df334ddc1", + "reference": "4b39e1f232b2e619b0d7fb4004f2356df334ddc1", + "shasum": "" + }, + "require": { + "php": ">=8.0", + "utopia-php/cli": "0.14.*", + "utopia-php/framework": "0.*.*" + }, + "require-dev": { + "laravel/pint": "^0.2.3", + "phpstan/phpstan": "^1.8", + "phpunit/phpunit": "^9.5.5", + "swoole/ide-helper": "4.8.8", + "workerman/workerman": "^4.0" + }, + "suggest": { + "ext-swoole": "Needed to support Swoole.", + "workerman/workerman": "Needed to support Workerman." + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Queue\\": "src/Queue" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Torsten Dittmann", + "email": "torsten@appwrite.io" + } + ], + "description": "A powerful task queue.", + "keywords": [ + "Tasks", + "framework", + "php", + "queue", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/queue/issues", + "source": "https://github.com/utopia-php/queue/tree/0.5.1" + }, + "time": "2022-11-16T19:47:26+00:00" + }, + { + "name": "utopia-php/registry", + "version": "0.5.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/registry.git", + "reference": "bedc4ed54527b2803e6dfdccc39449f98522b70d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/registry/zipball/bedc4ed54527b2803e6dfdccc39449f98522b70d", + "reference": "bedc4ed54527b2803e6dfdccc39449f98522b70d", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Registry\\": "src/Registry" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple dependency management library for PHP", + "keywords": [ + "dependency management", + "di", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/registry/issues", + "source": "https://github.com/utopia-php/registry/tree/0.5.0" + }, + "time": "2021-03-10T10:45:22+00:00" + }, + { + "name": "utopia-php/storage", + "version": "0.13.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/storage.git", + "reference": "f34c010e4f8394a6b4aff70b6de55041d9a145d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/storage/zipball/f34c010e4f8394a6b4aff70b6de55041d9a145d3", + "reference": "f34c010e4f8394a6b4aff70b6de55041d9a145d3", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "ext-zlib": "*", + "ext-zstd": "*", + "php": ">=8.0", + "utopia-php/framework": "0.*.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Storage\\": "src/Storage" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple Storage library to manage application storage", + "keywords": [ + "framework", + "php", + "storage", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/storage/issues", + "source": "https://github.com/utopia-php/storage/tree/0.13.0" + }, + "time": "2022-11-17T15:10:18+00:00" + }, + { + "name": "utopia-php/swoole", + "version": "0.5.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/swoole.git", + "reference": "c2a3a4f944a2f22945af3cbcb95b13f0769628b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/swoole/zipball/c2a3a4f944a2f22945af3cbcb95b13f0769628b1", + "reference": "c2a3a4f944a2f22945af3cbcb95b13f0769628b1", + "shasum": "" + }, + "require": { + "ext-swoole": "*", + "php": ">=8.0", + "utopia-php/framework": "0.*.*" + }, + "require-dev": { + "laravel/pint": "1.2.*", + "phpunit/phpunit": "^9.3", + "swoole/ide-helper": "4.8.3", + "vimeo/psalm": "4.15.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Swoole\\": "src/Swoole" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "An extension for Utopia Framework to work with PHP Swoole as a PHP FPM alternative", + "keywords": [ + "framework", + "http", + "php", + "server", + "swoole", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/swoole/issues", + "source": "https://github.com/utopia-php/swoole/tree/0.5.0" + }, + "time": "2022-10-19T22:19:07+00:00" + }, + { + "name": "utopia-php/system", + "version": "0.6.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/system.git", + "reference": "289c4327713deadc9c748b5317d248133a02f245" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/system/zipball/289c4327713deadc9c748b5317d248133a02f245", + "reference": "289c4327713deadc9c748b5317d248133a02f245", + "shasum": "" + }, + "require": { + "laravel/pint": "1.2.*", + "php": ">=7.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "squizlabs/php_codesniffer": "^3.6", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\System\\": "src/System" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Torsten Dittmann", + "email": "torsten@appwrite.io" + } + ], + "description": "A simple library for obtaining information about the host's system.", + "keywords": [ + "framework", + "php", + "system", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/system/issues", + "source": "https://github.com/utopia-php/system/tree/0.6.0" + }, + "time": "2022-11-07T13:51:59+00:00" + }, + { + "name": "utopia-php/websocket", + "version": "0.1.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/websocket.git", + "reference": "51fcb86171400d8aa40d76c54593481fd273dab5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/websocket/zipball/51fcb86171400d8aa40d76c54593481fd273dab5", + "reference": "51fcb86171400d8aa40d76c54593481fd273dab5", + "shasum": "" + }, + "require": { + "php": ">=8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5.5", + "swoole/ide-helper": "4.6.6", + "textalk/websocket": "1.5.2", + "vimeo/psalm": "^4.8.1", + "workerman/workerman": "^4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\WebSocket\\": "src/WebSocket" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Torsten Dittmann", + "email": "torsten@appwrite.io" + } + ], + "description": "A simple abstraction for WebSocket servers.", + "keywords": [ + "framework", + "php", + "upf", + "utopia", + "websocket" + ], + "support": { + "issues": "https://github.com/utopia-php/websocket/issues", + "source": "https://github.com/utopia-php/websocket/tree/0.1.0" + }, + "time": "2021-12-20T10:50:09+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" + } + ], + "packages-dev": [ + { + "name": "appwrite/sdk-generator", + "version": "0.28.1", + "source": { + "type": "git", + "url": "https://github.com/appwrite/sdk-generator.git", + "reference": "ed8d3daa66589733b49b11c053d524cdf576ffee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ed8d3daa66589733b49b11c053d524cdf576ffee", + "reference": "ed8d3daa66589733b49b11c053d524cdf576ffee", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "matthiasmullie/minify": "^1.3.68", + "php": ">=7.0.0", + "twig/twig": "^3.4.1" + }, + "require-dev": { + "brianium/paratest": "^6.4", + "phpunit/phpunit": "^9.5.21" + }, + "type": "library", + "autoload": { + "psr-4": { + "Appwrite\\SDK\\": "src/SDK", + "Appwrite\\Spec\\": "src/Spec" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "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.28.1" + }, + "time": "2022-09-22T09:15:54+00:00" + }, + { + "name": "doctrine/annotations", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "d02c9f3742044e17d5fa8d28d8402a2d95c33302" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/d02c9f3742044e17d5fa8d28d8402a2d95c33302", + "reference": "d02c9f3742044e17d5fa8d28d8402a2d95c33302", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^2 || ^3", + "ext-tokenizer": "*", + "php": "^7.2 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^2.0", + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.8.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "symfony/cache": "^5.4 || ^6", + "vimeo/psalm": "^4.10" + }, + "suggest": { + "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/2.0.0" + }, + "time": "2022-12-19T18:17:20+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:15:36+00:00" + }, + { + "name": "doctrine/lexer", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "84a527db05647743d50373e0ec53a152f2cde568" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/84a527db05647743d50373e0ec53a152f2cde568", + "reference": "84a527db05647743d50373e0ec53a152f2cde568", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.9", + "phpunit/phpunit": "^9.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/3.0.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2022-12-15T16:57:16+00:00" + }, + { + "name": "matthiasmullie/minify", + "version": "1.3.70", + "source": { + "type": "git", + "url": "https://github.com/matthiasmullie/minify.git", + "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/2807d9f9bece6877577ad44acb5c801bb3ae536b", + "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "matthiasmullie/path-converter": "~1.1", + "php": ">=5.3.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": ">=2.0", + "matthiasmullie/scrapbook": ">=1.3", + "phpunit/phpunit": ">=4.8", + "squizlabs/php_codesniffer": ">=3.0" + }, + "suggest": { + "psr/cache-implementation": "Cache implementation to use with Minify::cache" + }, + "bin": [ + "bin/minifycss", + "bin/minifyjs" + ], + "type": "library", + "autoload": { + "psr-4": { + "MatthiasMullie\\Minify\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthias Mullie", + "email": "minify@mullie.eu", + "homepage": "https://www.mullie.eu", + "role": "Developer" + } + ], + "description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.", + "homepage": "https://github.com/matthiasmullie/minify", + "keywords": [ + "JS", + "css", + "javascript", + "minifier", + "minify" + ], + "support": { + "issues": "https://github.com/matthiasmullie/minify/issues", + "source": "https://github.com/matthiasmullie/minify/tree/1.3.70" + }, + "funding": [ + { + "url": "https://github.com/matthiasmullie", + "type": "github" + } + ], + "time": "2022-12-09T12:56:44+00:00" + }, + { + "name": "matthiasmullie/path-converter", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/matthiasmullie/path-converter.git", + "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/matthiasmullie/path-converter/zipball/e7d13b2c7e2f2268e1424aaed02085518afa02d9", + "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "MatthiasMullie\\PathConverter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthias Mullie", + "email": "pathconverter@mullie.eu", + "homepage": "http://www.mullie.eu", + "role": "Developer" + } + ], + "description": "Relative path converter", + "homepage": "http://github.com/matthiasmullie/path-converter", + "keywords": [ + "converter", + "path", + "paths", + "relative" + ], + "support": { + "issues": "https://github.com/matthiasmullie/path-converter/issues", + "source": "https://github.com/matthiasmullie/path-converter/tree/1.1.3" + }, + "time": "2019-02-05T23:41:09+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2022-03-03T13:19:32+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.15.3", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039", + "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3" + }, + "time": "2023-01-16T22:05:37+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpbench/container", + "version": "2.2.1", + "source": { + "type": "git", + "url": "https://github.com/phpbench/container.git", + "reference": "6d555ff7174fca13f9b1ec0b4a089ed41d0ab392" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpbench/container/zipball/6d555ff7174fca13f9b1ec0b4a089ed41d0ab392", + "reference": "6d555ff7174fca13f9b1ec0b4a089ed41d0ab392", + "shasum": "" + }, + "require": { + "psr/container": "^1.0|^2.0", + "symfony/options-resolver": "^4.2 || ^5.0 || ^6.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.16", + "phpstan/phpstan": "^0.12.52", + "phpunit/phpunit": "^8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "PhpBench\\DependencyInjection\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Leech", + "email": "daniel@dantleech.com" + } + ], + "description": "Simple, configurable, service container.", + "support": { + "issues": "https://github.com/phpbench/container/issues", + "source": "https://github.com/phpbench/container/tree/2.2.1" + }, + "time": "2022-01-25T10:17:35+00:00" + }, + { + "name": "phpbench/dom", + "version": "0.3.2", + "source": { + "type": "git", + "url": "https://github.com/phpbench/dom.git", + "reference": "b013b717832ddbaadf2a40984b04bc66af9a7110" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpbench/dom/zipball/b013b717832ddbaadf2a40984b04bc66af9a7110", + "reference": "b013b717832ddbaadf2a40984b04bc66af9a7110", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "php": "^7.2||^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.18", + "phpstan/phpstan": "^0.12.83", + "phpunit/phpunit": "^8.0||^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpBench\\Dom\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Leech", + "email": "daniel@dantleech.com" + } + ], + "description": "DOM wrapper to simplify working with the PHP DOM implementation", + "support": { + "issues": "https://github.com/phpbench/dom/issues", + "source": "https://github.com/phpbench/dom/tree/0.3.2" + }, + "time": "2021-09-24T15:26:07+00:00" + }, + { + "name": "phpbench/phpbench", + "version": "1.2.8", + "source": { + "type": "git", + "url": "https://github.com/phpbench/phpbench.git", + "reference": "3f7b3c200f86727de7a14bde94adb68a88e1bafc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpbench/phpbench/zipball/3f7b3c200f86727de7a14bde94adb68a88e1bafc", + "reference": "3f7b3c200f86727de7a14bde94adb68a88e1bafc", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.13 || ^2.0", + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "ext-tokenizer": "*", + "php": "^7.3 || ^8.0", + "phpbench/container": "^2.1", + "phpbench/dom": "~0.3.1", + "psr/log": "^1.1 || ^2.0 || ^3.0", + "seld/jsonlint": "^1.1", + "symfony/console": "^4.2 || ^5.0 || ^6.0", + "symfony/filesystem": "^4.2 || ^5.0 || ^6.0", + "symfony/finder": "^4.2 || ^5.0 || ^6.0", + "symfony/options-resolver": "^4.2 || ^5.0 || ^6.0", + "symfony/process": "^4.2 || ^5.0 || ^6.0", + "webmozart/glob": "^4.6" + }, + "require-dev": { + "dantleech/invoke": "^2.0", + "friendsofphp/php-cs-fixer": "^3.0", + "jangregor/phpstan-prophecy": "^1.0", + "phpspec/prophecy": "^1.12", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^8.5.8 || ^9.0", + "symfony/error-handler": "^5.2 || ^6.0", + "symfony/var-dumper": "^4.0 || ^5.0 || ^6.0" + }, + "suggest": { + "ext-xdebug": "For Xdebug profiling extension." + }, + "bin": [ + "bin/phpbench" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "files": [ + "lib/Report/Func/functions.php" + ], + "psr-4": { + "PhpBench\\": "lib/", + "PhpBench\\Extensions\\XDebug\\": "extensions/xdebug/lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Leech", + "email": "daniel@dantleech.com" + } + ], + "description": "PHP Benchmarking Framework", + "support": { + "issues": "https://github.com/phpbench/phpbench/issues", + "source": "https://github.com/phpbench/phpbench/tree/1.2.8" + }, + "funding": [ + { + "url": "https://github.com/dantleech", + "type": "github" + } + ], + "time": "2023-01-14T13:08:42+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + }, + "time": "2021-10-19T17:43:47+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.6.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "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.2" + }, + "time": "2022-10-14T12:47:21+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.16.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be8cac52a0827776ff9ccda8c381ac5b71aeb359", + "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0 || ^7.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/v1.16.0" + }, + "time": "2022-11-29T15:06:56+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.24", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed", + "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.14", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "*", + "ext-xdebug": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-01-26T08:26:55+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.5.20", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba", + "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^3.0", + "sebastian/version": "^3.0.2" + }, + "require-dev": { + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.5-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-04-01T12:37:26+00:00" + }, + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:41:17+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-04-03T09:37:03+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T06:03:37+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-02-14T08:28:10+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-12T14:47:03+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "seld/jsonlint", + "version": "1.9.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "4211420d25eba80712bff236a98960ef68b866b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/4211420d25eba80712bff236a98960ef68b866b7", + "reference": "4211420d25eba80712bff236a98960ef68b866b7", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.5", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "support": { + "issues": "https://github.com/Seldaek/jsonlint/issues", + "source": "https://github.com/Seldaek/jsonlint/tree/1.9.0" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", + "type": "tidelift" + } + ], + "time": "2022-04-01T13:37:23+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.7.1", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2022-06-18T07:21:10+00:00" + }, + { + "name": "swoole/ide-helper", + "version": "4.8.9", + "source": { + "type": "git", + "url": "https://github.com/swoole/ide-helper.git", + "reference": "8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swoole/ide-helper/zipball/8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe", + "reference": "8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe", + "shasum": "" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Team Swoole", + "email": "team@swoole.com" + } + ], + "description": "IDE help files for Swoole.", + "support": { + "issues": "https://github.com/swoole/ide-helper/issues", + "source": "https://github.com/swoole/ide-helper/tree/4.8.9" + }, + "funding": [ + { + "url": "https://gitee.com/swoole/swoole?donate=true", + "type": "custom" + }, + { + "url": "https://github.com/swoole", + "type": "github" + } + ], + "time": "2022-04-18T20:38:04+00:00" + }, + { + "name": "symfony/console", + "version": "v5.4.19", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "dccb8d251a9017d5994c988b034d3e18aaabf740" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/dccb8d251a9017d5994c988b034d3e18aaabf740", + "reference": "dccb8d251a9017d5994c988b034d3e18aaabf740", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.1|^6.0" + }, + "conflict": { + "psr/log": ">=3", + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0" + }, + "require-dev": { + "psr/log": "^1|^2", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/lock": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/var-dumper": "^4.4|^5.0|^6.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.4.19" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-01T08:32:19+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.3-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-25T10:21:52+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.4.19", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "648bfaca6a494f3e22378123bcee2894045dc9d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/648bfaca6a494f3e22378123bcee2894045dc9d8", + "reference": "648bfaca6a494f3e22378123bcee2894045dc9d8", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v5.4.19" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-14T19:14:44+00:00" + }, + { + "name": "symfony/finder", + "version": "v5.4.19", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "6071aebf810ad13fe8200c224f36103abb37cf1f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/6071aebf810ad13fe8200c224f36103abb37cf1f", + "reference": "6071aebf810ad13fe8200c224f36103abb37cf1f", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v5.4.19" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-14T19:14:44+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v5.4.19", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "b03c99236445492f20c61666e8f7e5d388b078e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b03c99236445492f20c61666e8f7e5d388b078e5", + "reference": "b03c99236445492f20c61666e8f7e5d388b078e5", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php73": "~1.0", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v5.4.19" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-01T08:32:19+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/process", + "version": "v5.4.19", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "c5ba874c9b636dbccf761e22ce750e88ec3f55e1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/c5ba874c9b636dbccf761e22ce750e88ec3f55e1", + "reference": "c5ba874c9b636dbccf761e22ce750e88ec3f55e1", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v5.4.19" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-01T08:32:19+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/aac98028c69df04ee77eb69b96b86ee51fbf4b75", + "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^2.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.3-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-25T10:21:52+00:00" + }, + { + "name": "symfony/string", + "version": "v6.2.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0", + "reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.0" + }, + "require-dev": { + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v6.2.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-01T08:38:09+00:00" + }, + { + "name": "textalk/websocket", + "version": "1.5.7", + "source": { + "type": "git", + "url": "https://github.com/Textalk/websocket-php.git", + "reference": "1712325e99b6bf869ccbf9bf41ab749e7328ea46" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Textalk/websocket-php/zipball/1712325e99b6bf869ccbf9bf41ab749e7328ea46", + "reference": "1712325e99b6bf869ccbf9bf41ab749e7328ea46", + "shasum": "" + }, + "require": { + "php": "^7.2 | ^8.0", + "psr/log": "^1 | ^2 | ^3" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.0", + "phpunit/phpunit": "^8.0|^9.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "WebSocket\\": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Fredrik Liljegren" + }, + { + "name": "Sören Jensen", + "email": "soren@abicart.se" + } + ], + "description": "WebSocket client and server", + "support": { + "issues": "https://github.com/Textalk/websocket-php/issues", + "source": "https://github.com/Textalk/websocket-php/tree/1.5.7" + }, + "time": "2022-03-29T09:46:59+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + }, + { + "name": "twig/twig", + "version": "v3.5.0", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/3ffcf4b7d890770466da3b2666f82ac054e7ec72", + "reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-mbstring": "^1.3" + }, + "require-dev": { + "psr/container": "^1.0", + "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.5-dev" + } + }, + "autoload": { + "psr-4": { + "Twig\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Twig Team", + "role": "Contributors" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "https://twig.symfony.com", + "keywords": [ + "templating" + ], + "support": { + "issues": "https://github.com/twigphp/Twig/issues", + "source": "https://github.com/twigphp/Twig/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2022-12-27T12:28:18+00:00" + }, + { + "name": "webmozart/glob", + "version": "4.6.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/glob.git", + "reference": "3c17f7dec3d9d0e87b575026011f2e75a56ed655" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/glob/zipball/3c17f7dec3d9d0e87b575026011f2e75a56ed655", + "reference": "3c17f7dec3d9d0e87b575026011f2e75a56ed655", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5", + "symfony/filesystem": "^5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Glob\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A PHP implementation of Ant's glob.", + "support": { + "issues": "https://github.com/webmozarts/glob/issues", + "source": "https://github.com/webmozarts/glob/tree/4.6.0" + }, + "time": "2022-05-24T19:45:58+00:00" + } + ], + "aliases": [ + { + "package": "utopia-php/database", + "version": "dev-increment", + "alias": "0.28.0", + "alias_normalized": "0.28.0.0" + } + ], + "minimum-stability": "stable", + "stability-flags": { + "utopia-php/database": 20 + }, + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=8.0.0", + "ext-curl": "*", + "ext-imagick": "*", + "ext-mbstring": "*", + "ext-json": "*", + "ext-yaml": "*", + "ext-dom": "*", + "ext-redis": "*", + "ext-swoole": "*", + "ext-pdo": "*", + "ext-openssl": "*", + "ext-zlib": "*", + "ext-sockets": "*" + }, + "platform-dev": { + "ext-fileinfo": "*" + }, + "platform-overrides": { + "php": "8.0" + }, + "plugin-api-version": "2.2.0" +} From 316500fdf28ec39f2949161bc5afa846dae63ea2 Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 31 Jan 2023 17:31:18 +0200 Subject: [PATCH 61/94] removed some unnecessary files --- app/console | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/console b/app/console index 184ffdc02..7e3dc54fa 160000 --- a/app/console +++ b/app/console @@ -1 +1 @@ -Subproject commit 184ffdc0225afa33772a71ab25dfaef2ad8b386e +Subproject commit 7e3dc54faf469d71fdf391037083a61fedd7f174 From b4caeeabc4dc41318d5f6ecce152e471c762cdfe Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 31 Jan 2023 17:34:27 +0200 Subject: [PATCH 62/94] removed some unnecessary files --- app/console | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/console b/app/console index 7e3dc54fa..5deba7618 160000 --- a/app/console +++ b/app/console @@ -1 +1 @@ -Subproject commit 7e3dc54faf469d71fdf391037083a61fedd7f174 +Subproject commit 5deba7618ddcc1d5135fc84b5e66e63433a834c4 From 7b505d51a26d74b853d00f56b349479458ae75b5 Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 31 Jan 2023 20:09:51 +0200 Subject: [PATCH 63/94] removed some unnecessary files --- composer.json | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/composer.json b/composer.json index dec429fb0..fbb26942c 100644 --- a/composer.json +++ b/composer.json @@ -12,19 +12,7 @@ "scripts": { "test": "vendor/bin/phpunit", "lint": "vendor/bin/phpcs", - "format": "vendor/bin/phpcbf", - "benchmark": [ - "Composer\\Config::disableProcessTimeout", - "vendor/bin/phpbench run --report=appwrite --" - ], - "benchmark-tag": [ - "Composer\\Config::disableProcessTimeout", - "vendor/bin/phpbench run --report=appwrite --tag=baseline --" - ], - "benchmark-compare": [ - "Composer\\Config::disableProcessTimeout", - "vendor/bin/phpbench run --report=appwrite --ref=baseline --" - ] + "format": "vendor/bin/phpcbf" }, "autoload": { "psr-4": { @@ -36,7 +24,6 @@ "psr-4": { "Tests\\E2E\\": "tests/e2e", "Tests\\Unit\\": "tests/unit", - "Tests\\Benchmarks\\": "tests/benchmarks", "Appwrite\\Tests\\": "tests/extensions" } }, From 19d04490dfd929960540c1ba756a5c2e0667d9d3 Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 31 Jan 2023 20:27:34 +0200 Subject: [PATCH 64/94] removed some unnecessary files --- app/workers/usage.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/workers/usage.php b/app/workers/usage.php index 127f58a7c..450de6955 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -25,6 +25,7 @@ $periods['1d'] = 'Y-m-d 00:00'; //$periods['1m'] = 'Y-m-1 00:00'; $periods['inf'] = '0000-00-00 00:00'; + /** * On Documents that tied by relations like functions>deployments>build || documents>collection>database || buckets>files * When we remove a parent document we need to deduct his children aggregation from the project scope From 7e03ca8c9823758e78e18f132c82293fca75399d Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 1 Feb 2023 10:30:21 +0200 Subject: [PATCH 65/94] Migration v17 --- composer.lock | 6489 ------------------------------------------------- 1 file changed, 6489 deletions(-) delete mode 100644 composer.lock diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 510bee803..000000000 --- a/composer.lock +++ /dev/null @@ -1,6489 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "a38abc1452cd5f641e1cabfeeb41b524", - "packages": [ - { - "name": "adhocore/jwt", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/adhocore/php-jwt.git", - "reference": "6c434af7170090bb7a8880d2bc220a2254ba7899" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/adhocore/php-jwt/zipball/6c434af7170090bb7a8880d2bc220a2254ba7899", - "reference": "6c434af7170090bb7a8880d2bc220a2254ba7899", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.5 || ^7.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Ahc\\Jwt\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jitendra Adhikari", - "email": "jiten.adhikary@gmail.com" - } - ], - "description": "Ultra lightweight JSON web token (JWT) library for PHP5.5+.", - "keywords": [ - "auth", - "json-web-token", - "jwt", - "jwt-auth", - "jwt-php", - "token" - ], - "support": { - "issues": "https://github.com/adhocore/php-jwt/issues", - "source": "https://github.com/adhocore/php-jwt/tree/1.1.2" - }, - "funding": [ - { - "url": "https://paypal.me/ji10", - "type": "custom" - } - ], - "time": "2021-02-20T09:56:44+00:00" - }, - { - "name": "appwrite/php-clamav", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/appwrite/php-clamav.git", - "reference": "61d00f24f9e7766fbba233e7b8d09c5475388073" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/appwrite/php-clamav/zipball/61d00f24f9e7766fbba233e7b8d09c5475388073", - "reference": "61d00f24f9e7766fbba233e7b8d09c5475388073", - "shasum": "" - }, - "require": { - "ext-sockets": "*", - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Appwrite\\ClamAV\\": "src/ClamAV" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "ClamAV network and pipe client for PHP", - "keywords": [ - "anti virus", - "appwrite", - "clamav", - "php" - ], - "support": { - "issues": "https://github.com/appwrite/php-clamav/issues", - "source": "https://github.com/appwrite/php-clamav/tree/1.1.0" - }, - "time": "2020-10-02T05:23:46+00:00" - }, - { - "name": "appwrite/php-runtimes", - "version": "0.11.1", - "source": { - "type": "git", - "url": "https://github.com/appwrite/runtimes.git", - "reference": "9d74a477ba3333cbcfac565c46fcf19606b7b603" - }, - "require": { - "php": ">=8.0", - "utopia-php/system": "0.6.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Appwrite\\Runtimes\\": "src/Runtimes" - } - }, - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Torsten Dittmann", - "email": "torsten@appwrite.io" - } - ], - "description": "Appwrite repository for Cloud Function runtimes that contains the configurations and tests for all of the Appwrite runtime environments.", - "keywords": [ - "appwrite", - "php", - "runtimes" - ], - "time": "2022-11-07T16:45:52+00:00" - }, - { - "name": "chillerlan/php-qrcode", - "version": "4.3.3", - "source": { - "type": "git", - "url": "https://github.com/chillerlan/php-qrcode.git", - "reference": "6356b246948ac1025882b3f55e7c68ebd4515ae3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/6356b246948ac1025882b3f55e7c68ebd4515ae3", - "reference": "6356b246948ac1025882b3f55e7c68ebd4515ae3", - "shasum": "" - }, - "require": { - "chillerlan/php-settings-container": "^2.1", - "ext-mbstring": "*", - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "phan/phan": "^5.3", - "phpunit/phpunit": "^9.5", - "setasign/fpdf": "^1.8.2" - }, - "suggest": { - "chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.", - "setasign/fpdf": "Required to use the QR FPDF output." - }, - "type": "library", - "autoload": { - "psr-4": { - "chillerlan\\QRCode\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kazuhiko Arase", - "homepage": "https://github.com/kazuhikoarase" - }, - { - "name": "Smiley", - "email": "smiley@chillerlan.net", - "homepage": "https://github.com/codemasher" - }, - { - "name": "Contributors", - "homepage": "https://github.com/chillerlan/php-qrcode/graphs/contributors" - } - ], - "description": "A QR code generator. PHP 7.4+", - "homepage": "https://github.com/chillerlan/php-qrcode", - "keywords": [ - "phpqrcode", - "qr", - "qr code", - "qrcode", - "qrcode-generator" - ], - "support": { - "issues": "https://github.com/chillerlan/php-qrcode/issues", - "source": "https://github.com/chillerlan/php-qrcode/tree/4.3.3" - }, - "funding": [ - { - "url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", - "type": "custom" - }, - { - "url": "https://ko-fi.com/codemasher", - "type": "ko_fi" - } - ], - "time": "2021-11-25T22:38:09+00:00" - }, - { - "name": "chillerlan/php-settings-container", - "version": "2.1.4", - "source": { - "type": "git", - "url": "https://github.com/chillerlan/php-settings-container.git", - "reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/1beb7df3c14346d4344b0b2e12f6f9a74feabd4a", - "reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "phan/phan": "^5.3", - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "chillerlan\\Settings\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Smiley", - "email": "smiley@chillerlan.net", - "homepage": "https://github.com/codemasher" - } - ], - "description": "A container class for immutable settings objects. Not a DI container. PHP 7.4+", - "homepage": "https://github.com/chillerlan/php-settings-container", - "keywords": [ - "PHP7", - "Settings", - "configuration", - "container", - "helper" - ], - "support": { - "issues": "https://github.com/chillerlan/php-settings-container/issues", - "source": "https://github.com/chillerlan/php-settings-container" - }, - "funding": [ - { - "url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", - "type": "custom" - }, - { - "url": "https://ko-fi.com/codemasher", - "type": "ko_fi" - } - ], - "time": "2022-07-05T22:32:14+00:00" - }, - { - "name": "colinmollenhour/credis", - "version": "v1.14.0", - "source": { - "type": "git", - "url": "https://github.com/colinmollenhour/credis.git", - "reference": "dccc8a46586475075fbb012d8bd523b8a938c2dc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/dccc8a46586475075fbb012d8bd523b8a938c2dc", - "reference": "dccc8a46586475075fbb012d8bd523b8a938c2dc", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "suggest": { - "ext-redis": "Improved performance for communicating with redis" - }, - "type": "library", - "autoload": { - "classmap": [ - "Client.php", - "Cluster.php", - "Sentinel.php", - "Module.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Colin Mollenhour", - "email": "colin@mollenhour.com" - } - ], - "description": "Credis is a lightweight interface to the Redis key-value store which wraps the phpredis library when available for better performance.", - "homepage": "https://github.com/colinmollenhour/credis", - "support": { - "issues": "https://github.com/colinmollenhour/credis/issues", - "source": "https://github.com/colinmollenhour/credis/tree/v1.14.0" - }, - "time": "2022-11-09T01:18:39+00:00" - }, - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.5", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" - }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-01-17T14:14:24+00:00" - }, - { - "name": "dragonmantank/cron-expression", - "version": "v3.3.1", - "source": { - "type": "git", - "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/be85b3f05b46c39bbc0d95f6c071ddff669510fa", - "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa", - "shasum": "" - }, - "require": { - "php": "^7.2|^8.0", - "webmozart/assert": "^1.0" - }, - "replace": { - "mtdowling/cron-expression": "^1.0" - }, - "require-dev": { - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-webmozart-assert": "^1.0", - "phpunit/phpunit": "^7.0|^8.0|^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Cron\\": "src/Cron/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Tankersley", - "email": "chris@ctankersley.com", - "homepage": "https://github.com/dragonmantank" - } - ], - "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", - "keywords": [ - "cron", - "schedule" - ], - "support": { - "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.1" - }, - "funding": [ - { - "url": "https://github.com/dragonmantank", - "type": "github" - } - ], - "time": "2022-01-18T15:43:28+00:00" - }, - { - "name": "jean85/pretty-package-versions", - "version": "1.6.0", - "source": { - "type": "git", - "url": "https://github.com/Jean85/pretty-package-versions.git", - "reference": "1e0104b46f045868f11942aea058cd7186d6c303" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/1e0104b46f045868f11942aea058cd7186d6c303", - "reference": "1e0104b46f045868f11942aea058cd7186d6c303", - "shasum": "" - }, - "require": { - "composer/package-versions-deprecated": "^1.8.0", - "php": "^7.0|^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0|^8.5|^9.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Jean85\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Alessandro Lai", - "email": "alessandro.lai85@gmail.com" - } - ], - "description": "A wrapper for ocramius/package-versions to get pretty versions strings", - "keywords": [ - "composer", - "package", - "release", - "versions" - ], - "support": { - "issues": "https://github.com/Jean85/pretty-package-versions/issues", - "source": "https://github.com/Jean85/pretty-package-versions/tree/1.6.0" - }, - "time": "2021-02-04T16:20:16+00:00" - }, - { - "name": "laravel/pint", - "version": "v1.2.1", - "source": { - "type": "git", - "url": "https://github.com/laravel/pint.git", - "reference": "e60e2112ee779ce60f253695b273d1646a17d6f1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/e60e2112ee779ce60f253695b273d1646a17d6f1", - "reference": "e60e2112ee779ce60f253695b273d1646a17d6f1", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-mbstring": "*", - "ext-tokenizer": "*", - "ext-xml": "*", - "php": "^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.11.0", - "illuminate/view": "^9.32.0", - "laravel-zero/framework": "^9.2.0", - "mockery/mockery": "^1.5.1", - "nunomaduro/larastan": "^2.2.0", - "nunomaduro/termwind": "^1.14.0", - "pestphp/pest": "^1.22.1" - }, - "bin": [ - "builds/pint" - ], - "type": "project", - "autoload": { - "psr-4": { - "App\\": "app/", - "Database\\Seeders\\": "database/seeders/", - "Database\\Factories\\": "database/factories/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nuno Maduro", - "email": "enunomaduro@gmail.com" - } - ], - "description": "An opinionated code formatter for PHP.", - "homepage": "https://laravel.com", - "keywords": [ - "format", - "formatter", - "lint", - "linter", - "php" - ], - "support": { - "issues": "https://github.com/laravel/pint/issues", - "source": "https://github.com/laravel/pint" - }, - "time": "2022-11-29T16:25:20+00:00" - }, - { - "name": "matomo/device-detector", - "version": "6.0.0", - "source": { - "type": "git", - "url": "https://github.com/matomo-org/device-detector.git", - "reference": "7fc2af3af62bd69e6e3404d561e371a83c112be9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/matomo-org/device-detector/zipball/7fc2af3af62bd69e6e3404d561e371a83c112be9", - "reference": "7fc2af3af62bd69e6e3404d561e371a83c112be9", - "shasum": "" - }, - "require": { - "mustangostang/spyc": "*", - "php": "^7.2|^8.0" - }, - "replace": { - "piwik/device-detector": "self.version" - }, - "require-dev": { - "matthiasmullie/scrapbook": "^1.4.7", - "mayflower/mo4-coding-standard": "^v8.0.0", - "phpstan/phpstan": "^0.12.52", - "phpunit/phpunit": "^8.5.8", - "psr/cache": "^1.0.1", - "psr/simple-cache": "^1.0.1", - "symfony/yaml": "^5.1.7" - }, - "suggest": { - "doctrine/cache": "Can directly be used for caching purpose", - "ext-yaml": "Necessary for using the Pecl YAML parser" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeviceDetector\\": "" - }, - "exclude-from-classmap": [ - "Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "The Matomo Team", - "email": "hello@matomo.org", - "homepage": "https://matomo.org/team/" - } - ], - "description": "The Universal Device Detection library, that parses User Agents and detects devices (desktop, tablet, mobile, tv, cars, console, etc.), clients (browsers, media players, mobile apps, feed readers, libraries, etc), operating systems, devices, brands and models.", - "homepage": "https://matomo.org", - "keywords": [ - "devicedetection", - "parser", - "useragent" - ], - "support": { - "forum": "https://forum.matomo.org/", - "issues": "https://github.com/matomo-org/device-detector/issues", - "source": "https://github.com/matomo-org/matomo", - "wiki": "https://dev.matomo.org/" - }, - "time": "2022-04-11T09:58:17+00:00" - }, - { - "name": "mongodb/mongodb", - "version": "1.8.0", - "source": { - "type": "git", - "url": "https://github.com/mongodb/mongo-php-library.git", - "reference": "953dbc19443aa9314c44b7217a16873347e6840d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/953dbc19443aa9314c44b7217a16873347e6840d", - "reference": "953dbc19443aa9314c44b7217a16873347e6840d", - "shasum": "" - }, - "require": { - "ext-hash": "*", - "ext-json": "*", - "ext-mongodb": "^1.8.1", - "jean85/pretty-package-versions": "^1.2", - "php": "^7.0 || ^8.0", - "symfony/polyfill-php80": "^1.19" - }, - "require-dev": { - "squizlabs/php_codesniffer": "^3.5, <3.5.5", - "symfony/phpunit-bridge": "5.x-dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8.x-dev" - } - }, - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "MongoDB\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Andreas Braun", - "email": "andreas.braun@mongodb.com" - }, - { - "name": "Jeremy Mikola", - "email": "jmikola@gmail.com" - } - ], - "description": "MongoDB driver library", - "homepage": "https://jira.mongodb.org/browse/PHPLIB", - "keywords": [ - "database", - "driver", - "mongodb", - "persistence" - ], - "support": { - "issues": "https://github.com/mongodb/mongo-php-library/issues", - "source": "https://github.com/mongodb/mongo-php-library/tree/1.8.0" - }, - "time": "2020-11-25T12:26:02+00:00" - }, - { - "name": "mustangostang/spyc", - "version": "0.6.3", - "source": { - "type": "git", - "url": "git@github.com:mustangostang/spyc.git", - "reference": "4627c838b16550b666d15aeae1e5289dd5b77da0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mustangostang/spyc/zipball/4627c838b16550b666d15aeae1e5289dd5b77da0", - "reference": "4627c838b16550b666d15aeae1e5289dd5b77da0", - "shasum": "" - }, - "require": { - "php": ">=5.3.1" - }, - "require-dev": { - "phpunit/phpunit": "4.3.*@dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.5.x-dev" - } - }, - "autoload": { - "files": [ - "Spyc.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "mustangostang", - "email": "vlad.andersen@gmail.com" - } - ], - "description": "A simple YAML loader/dumper class for PHP", - "homepage": "https://github.com/mustangostang/spyc/", - "keywords": [ - "spyc", - "yaml", - "yml" - ], - "time": "2019-09-10T13:16:29+00:00" - }, - { - "name": "phpmailer/phpmailer", - "version": "v6.6.0", - "source": { - "type": "git", - "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e43bac82edc26ca04b36143a48bde1c051cfd5b1", - "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-filter": "*", - "ext-hash": "*", - "php": ">=5.5.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "doctrine/annotations": "^1.2", - "php-parallel-lint/php-console-highlighter": "^0.5.0", - "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpcompatibility/php-compatibility": "^9.3.5", - "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.6.2", - "yoast/phpunit-polyfills": "^1.0.0" - }, - "suggest": { - "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", - "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", - "league/oauth2-google": "Needed for Google XOAUTH2 authentication", - "psr/log": "For optional PSR-3 debug logging", - "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", - "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" - }, - "type": "library", - "autoload": { - "psr-4": { - "PHPMailer\\PHPMailer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1-only" - ], - "authors": [ - { - "name": "Marcus Bointon", - "email": "phpmailer@synchromedia.co.uk" - }, - { - "name": "Jim Jagielski", - "email": "jimjag@gmail.com" - }, - { - "name": "Andy Prevost", - "email": "codeworxtech@users.sourceforge.net" - }, - { - "name": "Brent R. Matzelle" - } - ], - "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "support": { - "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.0" - }, - "funding": [ - { - "url": "https://github.com/Synchro", - "type": "github" - } - ], - "time": "2022-02-28T15:31:21+00:00" - }, - { - "name": "psr/log", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" - }, - "time": "2021-05-03T11:20:27+00:00" - }, - { - "name": "resque/php-resque", - "version": "v1.3.6", - "source": { - "type": "git", - "url": "https://github.com/resque/php-resque.git", - "reference": "fe41c04763699b1318d97ed14cc78583e9380161" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/resque/php-resque/zipball/fe41c04763699b1318d97ed14cc78583e9380161", - "reference": "fe41c04763699b1318d97ed14cc78583e9380161", - "shasum": "" - }, - "require": { - "colinmollenhour/credis": "~1.7", - "php": ">=5.6.0", - "psr/log": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, - "suggest": { - "ext-pcntl": "REQUIRED for forking processes on platforms that support it (so anything but Windows).", - "ext-proctitle": "Allows php-resque to rename the title of UNIX processes to show the status of a worker.", - "ext-redis": "Native PHP extension for Redis connectivity. Credis will automatically utilize when available." - }, - "bin": [ - "bin/resque", - "bin/resque-scheduler" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Resque": "lib", - "ResqueScheduler": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dan Hunsaker", - "email": "danhunsaker+resque@gmail.com", - "role": "Maintainer" - }, - { - "name": "Rajib Ahmed", - "homepage": "https://github.com/rajibahmed", - "role": "Maintainer" - }, - { - "name": "Steve Klabnik", - "email": "steve@steveklabnik.com", - "role": "Maintainer" - }, - { - "name": "Chris Boulton", - "email": "chris@bigcommerce.com", - "role": "Creator" - } - ], - "description": "Redis backed library for creating background jobs and processing them later. Based on resque for Ruby.", - "homepage": "http://www.github.com/resque/php-resque/", - "keywords": [ - "background", - "job", - "redis", - "resque" - ], - "support": { - "issues": "https://github.com/resque/php-resque/issues", - "source": "https://github.com/resque/php-resque/tree/v1.3.6" - }, - "time": "2020-04-16T16:39:50+00:00" - }, - { - "name": "slickdeals/statsd", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/Slickdeals/statsd-php.git", - "reference": "225588a0a079e145359049f6e5e23eedb1b4c17f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Slickdeals/statsd-php/zipball/225588a0a079e145359049f6e5e23eedb1b4c17f", - "reference": "225588a0a079e145359049f6e5e23eedb1b4c17f", - "shasum": "" - }, - "require": { - "php": ">= 7.3 || ^8" - }, - "replace": { - "domnikl/statsd": "self.version" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.0", - "phpunit/phpunit": "^9", - "vimeo/psalm": "^4.6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Domnikl\\Statsd\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dominik Liebler", - "email": "liebler.dominik@gmail.com" - } - ], - "description": "a PHP client for statsd", - "homepage": "https://github.com/Slickdeals/statsd-php", - "keywords": [ - "Metrics", - "monitoring", - "statistics", - "statsd", - "udp" - ], - "support": { - "issues": "https://github.com/Slickdeals/statsd-php/issues", - "source": "https://github.com/Slickdeals/statsd-php/tree/3.1.0" - }, - "time": "2021-06-04T20:33:46+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "utopia-php/abuse", - "version": "0.16.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/abuse.git", - "reference": "6370d9150425460416583feba0990504ac789e98" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/abuse/zipball/6370d9150425460416583feba0990504ac789e98", - "reference": "6370d9150425460416583feba0990504ac789e98", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-pdo": "*", - "php": ">=8.0", - "utopia-php/database": "0.28.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.4", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Abuse\\": "src/Abuse" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple abuse library to manage application usage limits", - "keywords": [ - "Abuse", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/abuse/issues", - "source": "https://github.com/utopia-php/abuse/tree/0.16.0" - }, - "time": "2022-10-31T14:46:41+00:00" - }, - { - "name": "utopia-php/analytics", - "version": "0.2.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/analytics.git", - "reference": "adfc2d057a7f6ab618a77c8a20ed3e35485ff416" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/analytics/zipball/adfc2d057a7f6ab618a77c8a20ed3e35485ff416", - "reference": "adfc2d057a7f6ab618a77c8a20ed3e35485ff416", - "shasum": "" - }, - "require": { - "php": ">=7.4" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Analytics\\": "src/Analytics" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Torsten Dittmann", - "email": "torsten@appwrite.io" - } - ], - "description": "A simple library to track events & users.", - "keywords": [ - "analytics", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/analytics/issues", - "source": "https://github.com/utopia-php/analytics/tree/0.2.0" - }, - "time": "2021-03-23T21:33:07+00:00" - }, - { - "name": "utopia-php/audit", - "version": "0.17.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/audit.git", - "reference": "455471bd4de8d74026809e843f8c9740eb32922c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/audit/zipball/455471bd4de8d74026809e843f8c9740eb32922c", - "reference": "455471bd4de8d74026809e843f8c9740eb32922c", - "shasum": "" - }, - "require": { - "ext-pdo": "*", - "php": ">=8.0", - "utopia-php/database": "0.28.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Audit\\": "src/Audit" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A simple audit library to manage application users logs", - "keywords": [ - "Audit", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/audit/issues", - "source": "https://github.com/utopia-php/audit/tree/0.17.0" - }, - "time": "2022-10-31T14:44:52+00:00" - }, - { - "name": "utopia-php/cache", - "version": "0.8.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/cache.git", - "reference": "212e66100a1f32e674fca5d9bc317cc998303089" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/cache/zipball/212e66100a1f32e674fca5d9bc317cc998303089", - "reference": "212e66100a1f32e674fca5d9bc317cc998303089", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-memcached": "*", - "ext-redis": "*", - "php": ">=8.0" - }, - "require-dev": { - "laravel/pint": "1.2.*", - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.13.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Cache\\": "src/Cache" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A simple cache library to manage application cache storing, loading and purging", - "keywords": [ - "cache", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/cache/issues", - "source": "https://github.com/utopia-php/cache/tree/0.8.0" - }, - "time": "2022-10-16T16:48:09+00:00" - }, - { - "name": "utopia-php/cli", - "version": "0.14.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/cli.git", - "reference": "c30ef985a4e739758a0d95eb0706b357b6d8c086" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/cli/zipball/c30ef985a4e739758a0d95eb0706b357b6d8c086", - "reference": "c30ef985a4e739758a0d95eb0706b357b6d8c086", - "shasum": "" - }, - "require": { - "php": ">=7.4", - "utopia-php/framework": "0.*.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "squizlabs/php_codesniffer": "^3.6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\CLI\\": "src/CLI" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple CLI library to manage command line applications", - "keywords": [ - "cli", - "command line", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/cli/issues", - "source": "https://github.com/utopia-php/cli/tree/0.14.0" - }, - "time": "2022-10-09T10:19:07+00:00" - }, - { - "name": "utopia-php/config", - "version": "0.2.2", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/config.git", - "reference": "a3d7bc0312d7150d5e04b1362dc34b2b136908cc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/config/zipball/a3d7bc0312d7150d5e04b1362dc34b2b136908cc", - "reference": "a3d7bc0312d7150d5e04b1362dc34b2b136908cc", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Config\\": "src/Config" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple Config library to managing application config variables", - "keywords": [ - "config", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/config/issues", - "source": "https://github.com/utopia-php/config/tree/0.2.2" - }, - "time": "2020-10-24T09:49:09+00:00" - }, - { - "name": "utopia-php/database", - "version": "dev-increment", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/database.git", - "reference": "fc0a8bfc9826e1e64521a8e7a95904f9a999d6fb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/fc0a8bfc9826e1e64521a8e7a95904f9a999d6fb", - "reference": "fc0a8bfc9826e1e64521a8e7a95904f9a999d6fb", - "shasum": "" - }, - "require": { - "ext-pdo": "*", - "php": ">=8.0", - "utopia-php/cache": "0.8.*", - "utopia-php/framework": "0.*.*", - "utopia-php/mongo": "0.0.2" - }, - "require-dev": { - "ext-mongodb": "*", - "ext-redis": "*", - "fakerphp/faker": "^1.14", - "mongodb/mongodb": "1.8.0", - "phpunit/phpunit": "^9.4", - "swoole/ide-helper": "4.8.0", - "utopia-php/cli": "^0.11.0", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Database\\": "src/Database" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A simple library to manage application persistency using multiple database adapters", - "keywords": [ - "database", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/increment" - }, - "time": "2022-12-08T08:59:37+00:00" - }, - { - "name": "utopia-php/domains", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/domains.git", - "reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/domains/zipball/1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73", - "reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Domains\\": "src/Domains" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "Utopia Domains library is simple and lite library for parsing web domains. This library is aiming to be as simple and easy to learn and use.", - "keywords": [ - "domains", - "framework", - "icann", - "php", - "public suffix", - "tld", - "tld extract", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/domains/issues", - "source": "https://github.com/utopia-php/domains/tree/master" - }, - "time": "2020-02-23T07:40:02+00:00" - }, - { - "name": "utopia-php/dsn", - "version": "0.1.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/dsn.git", - "reference": "17a5935eab1b89fb4b95600db50a1b6d5faa6cea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/dsn/zipball/17a5935eab1b89fb4b95600db50a1b6d5faa6cea", - "reference": "17a5935eab1b89fb4b95600db50a1b6d5faa6cea", - "shasum": "" - }, - "require": { - "php": ">=8.0" - }, - "require-dev": { - "laravel/pint": "1.2.*", - "phpunit/phpunit": "^9.3", - "squizlabs/php_codesniffer": "^3.6", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\DSN\\": "src/DSN" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A simple library for parsing and managing Data Source Names ( DSNs )", - "keywords": [ - "dsn", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/dsn/issues", - "source": "https://github.com/utopia-php/dsn/tree/0.1.0" - }, - "time": "2022-10-26T10:06:20+00:00" - }, - { - "name": "utopia-php/framework", - "version": "0.25.1", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/framework.git", - "reference": "2391b397135586b2100d39e338827bef8d2f4ad0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/framework/zipball/2391b397135586b2100d39e338827bef8d2f4ad0", - "reference": "2391b397135586b2100d39e338827bef8d2f4ad0", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "require-dev": { - "laravel/pint": "^1.2", - "phpunit/phpunit": "^9.5.25", - "vimeo/psalm": "4.27.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A simple, light and advanced PHP framework", - "keywords": [ - "framework", - "php", - "upf" - ], - "support": { - "issues": "https://github.com/utopia-php/framework/issues", - "source": "https://github.com/utopia-php/framework/tree/0.25.1" - }, - "time": "2022-11-23T18:22:23+00:00" - }, - { - "name": "utopia-php/image", - "version": "0.5.4", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/image.git", - "reference": "ca5f436f9aa22dedaa6648f24f3687733808e336" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/image/zipball/ca5f436f9aa22dedaa6648f24f3687733808e336", - "reference": "ca5f436f9aa22dedaa6648f24f3687733808e336", - "shasum": "" - }, - "require": { - "ext-imagick": "*", - "php": ">=8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.13.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Image\\": "src/Image" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple Image manipulation library", - "keywords": [ - "framework", - "image", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/image/issues", - "source": "https://github.com/utopia-php/image/tree/0.5.4" - }, - "time": "2022-05-11T12:30:41+00:00" - }, - { - "name": "utopia-php/locale", - "version": "0.4.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/locale.git", - "reference": "c2d9358d0fe2f6b6ed5448369f9d1e430c615447" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/locale/zipball/c2d9358d0fe2f6b6ed5448369f9d1e430c615447", - "reference": "c2d9358d0fe2f6b6ed5448369f9d1e430c615447", - "shasum": "" - }, - "require": { - "php": ">=7.4" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Locale\\": "src/Locale" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple locale library to manage application translations", - "keywords": [ - "framework", - "locale", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/locale/issues", - "source": "https://github.com/utopia-php/locale/tree/0.4.0" - }, - "time": "2021-07-24T11:35:55+00:00" - }, - { - "name": "utopia-php/logger", - "version": "0.3.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/logger.git", - "reference": "079656cb5169ca9600861eda0b6819199e3d4a57" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/logger/zipball/079656cb5169ca9600861eda0b6819199e3d4a57", - "reference": "079656cb5169ca9600861eda0b6819199e3d4a57", - "shasum": "" - }, - "require": { - "php": ">=8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Logger\\": "src/Logger" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Matej Bačo", - "email": "matej@appwrite.io" - }, - { - "name": "Christy Jacob", - "email": "christy@appwrite.io" - } - ], - "description": "Utopia Logger library is simple and lite library for logging information, such as errors or warnings. This library is aiming to be as simple and easy to learn and use.", - "keywords": [ - "appsignal", - "errors", - "framework", - "logger", - "logging", - "logs", - "php", - "raygun", - "sentry", - "upf", - "utopia", - "warnings" - ], - "support": { - "issues": "https://github.com/utopia-php/logger/issues", - "source": "https://github.com/utopia-php/logger/tree/0.3.0" - }, - "time": "2022-03-18T10:56:57+00:00" - }, - { - "name": "utopia-php/messaging", - "version": "0.1.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/messaging.git", - "reference": "501272fad666f06bec8f130076862e7981a73f8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/messaging/zipball/501272fad666f06bec8f130076862e7981a73f8c", - "reference": "501272fad666f06bec8f130076862e7981a73f8c", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": ">=8.0.0" - }, - "require-dev": { - "phpmailer/phpmailer": "6.6.*", - "phpunit/phpunit": "9.5.*", - "squizlabs/php_codesniffer": "^3.6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Messaging\\": "src/Utopia/Messaging" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jake Barnby", - "email": "jake@appwrite.io" - } - ], - "description": "A simple, light and advanced PHP messaging library", - "keywords": [ - "library", - "messaging", - "php", - "upf", - "utopia", - "utopia-php" - ], - "support": { - "issues": "https://github.com/utopia-php/messaging/issues", - "source": "https://github.com/utopia-php/messaging/tree/0.1.0" - }, - "time": "2022-09-29T11:22:48+00:00" - }, - { - "name": "utopia-php/mongo", - "version": "0.0.2", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/mongo.git", - "reference": "62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/mongo/zipball/62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e", - "reference": "62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e", - "shasum": "" - }, - "require": { - "ext-mongodb": "*", - "mongodb/mongodb": "1.8.0", - "php": ">=8.0" - }, - "require-dev": { - "fakerphp/faker": "^1.14", - "laravel/pint": "1.2.*", - "phpstan/phpstan": "1.8.*", - "phpunit/phpunit": "^9.4", - "swoole/ide-helper": "4.8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Mongo\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Wess", - "email": "wess@appwrite.io" - } - ], - "description": "A simple library to manage Mongo database", - "keywords": [ - "database", - "mongo", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/mongo/issues", - "source": "https://github.com/utopia-php/mongo/tree/0.0.2" - }, - "time": "2022-11-08T11:58:46+00:00" - }, - { - "name": "utopia-php/orchestration", - "version": "0.9.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/orchestration.git", - "reference": "1d4f66684b8c4927f31b695817eae6d84aafd172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/orchestration/zipball/1d4f66684b8c4927f31b695817eae6d84aafd172", - "reference": "1d4f66684b8c4927f31b695817eae6d84aafd172", - "shasum": "" - }, - "require": { - "php": ">=8.0", - "utopia-php/cli": "0.14.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Orchestration\\": "src/Orchestration" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Lite & fast micro PHP abstraction library for container orchestration", - "keywords": [ - "docker", - "framework", - "kubernetes", - "orchestration", - "php", - "swarm", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/orchestration/issues", - "source": "https://github.com/utopia-php/orchestration/tree/0.9.0" - }, - "time": "2022-11-09T17:38:00+00:00" - }, - { - "name": "utopia-php/platform", - "version": "0.3.1", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/platform.git", - "reference": "fe9f64420957dc8fb6201d22b499572f021411e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/platform/zipball/fe9f64420957dc8fb6201d22b499572f021411e4", - "reference": "fe9f64420957dc8fb6201d22b499572f021411e4", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-redis": "*", - "php": ">=8.0", - "utopia-php/cli": "0.14.*", - "utopia-php/framework": "0.25.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "squizlabs/php_codesniffer": "^3.6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Platform\\": "src/Platform" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Light and Fast Platform Library", - "keywords": [ - "cache", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/platform/issues", - "source": "https://github.com/utopia-php/platform/tree/0.3.1" - }, - "time": "2022-11-10T07:04:24+00:00" - }, - { - "name": "utopia-php/pools", - "version": "0.4.2", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/pools.git", - "reference": "d2870ab74b31b7f4027799f082e85122154f8bed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/pools/zipball/d2870ab74b31b7f4027799f082e85122154f8bed", - "reference": "d2870ab74b31b7f4027799f082e85122154f8bed", - "shasum": "" - }, - "require": { - "php": ">=8.0" - }, - "require-dev": { - "laravel/pint": "1.2.*", - "phpstan/phpstan": "1.8.*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Pools\\": "src/Pools" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Team Appwrite", - "email": "team@appwrite.io" - } - ], - "description": "A simple library to manage connection pools", - "keywords": [ - "framework", - "php", - "pools", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/pools/issues", - "source": "https://github.com/utopia-php/pools/tree/0.4.2" - }, - "time": "2022-11-22T07:55:45+00:00" - }, - { - "name": "utopia-php/preloader", - "version": "0.2.4", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/preloader.git", - "reference": "65ef48392e72172f584b0baa2e224f9a1cebcce0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/preloader/zipball/65ef48392e72172f584b0baa2e224f9a1cebcce0", - "reference": "65ef48392e72172f584b0baa2e224f9a1cebcce0", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Preloader\\": "src/Preloader" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "team@appwrite.io" - } - ], - "description": "Utopia Preloader library is simple and lite library for managing PHP preloading configuration", - "keywords": [ - "framework", - "php", - "preload", - "preloader", - "preloading", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/preloader/issues", - "source": "https://github.com/utopia-php/preloader/tree/0.2.4" - }, - "time": "2020-10-24T07:04:59+00:00" - }, - { - "name": "utopia-php/queue", - "version": "0.5.1", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/queue.git", - "reference": "4b39e1f232b2e619b0d7fb4004f2356df334ddc1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/queue/zipball/4b39e1f232b2e619b0d7fb4004f2356df334ddc1", - "reference": "4b39e1f232b2e619b0d7fb4004f2356df334ddc1", - "shasum": "" - }, - "require": { - "php": ">=8.0", - "utopia-php/cli": "0.14.*", - "utopia-php/framework": "0.*.*" - }, - "require-dev": { - "laravel/pint": "^0.2.3", - "phpstan/phpstan": "^1.8", - "phpunit/phpunit": "^9.5.5", - "swoole/ide-helper": "4.8.8", - "workerman/workerman": "^4.0" - }, - "suggest": { - "ext-swoole": "Needed to support Swoole.", - "workerman/workerman": "Needed to support Workerman." - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Queue\\": "src/Queue" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Torsten Dittmann", - "email": "torsten@appwrite.io" - } - ], - "description": "A powerful task queue.", - "keywords": [ - "Tasks", - "framework", - "php", - "queue", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/queue/issues", - "source": "https://github.com/utopia-php/queue/tree/0.5.1" - }, - "time": "2022-11-16T19:47:26+00:00" - }, - { - "name": "utopia-php/registry", - "version": "0.5.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/registry.git", - "reference": "bedc4ed54527b2803e6dfdccc39449f98522b70d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/registry/zipball/bedc4ed54527b2803e6dfdccc39449f98522b70d", - "reference": "bedc4ed54527b2803e6dfdccc39449f98522b70d", - "shasum": "" - }, - "require": { - "php": ">=7.4" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Registry\\": "src/Registry" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple dependency management library for PHP", - "keywords": [ - "dependency management", - "di", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/registry/issues", - "source": "https://github.com/utopia-php/registry/tree/0.5.0" - }, - "time": "2021-03-10T10:45:22+00:00" - }, - { - "name": "utopia-php/storage", - "version": "0.13.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/storage.git", - "reference": "f34c010e4f8394a6b4aff70b6de55041d9a145d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/storage/zipball/f34c010e4f8394a6b4aff70b6de55041d9a145d3", - "reference": "f34c010e4f8394a6b4aff70b6de55041d9a145d3", - "shasum": "" - }, - "require": { - "ext-fileinfo": "*", - "ext-zlib": "*", - "ext-zstd": "*", - "php": ">=8.0", - "utopia-php/framework": "0.*.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Storage\\": "src/Storage" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple Storage library to manage application storage", - "keywords": [ - "framework", - "php", - "storage", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/storage/issues", - "source": "https://github.com/utopia-php/storage/tree/0.13.0" - }, - "time": "2022-11-17T15:10:18+00:00" - }, - { - "name": "utopia-php/swoole", - "version": "0.5.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/swoole.git", - "reference": "c2a3a4f944a2f22945af3cbcb95b13f0769628b1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/swoole/zipball/c2a3a4f944a2f22945af3cbcb95b13f0769628b1", - "reference": "c2a3a4f944a2f22945af3cbcb95b13f0769628b1", - "shasum": "" - }, - "require": { - "ext-swoole": "*", - "php": ">=8.0", - "utopia-php/framework": "0.*.*" - }, - "require-dev": { - "laravel/pint": "1.2.*", - "phpunit/phpunit": "^9.3", - "swoole/ide-helper": "4.8.3", - "vimeo/psalm": "4.15.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Swoole\\": "src/Swoole" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "An extension for Utopia Framework to work with PHP Swoole as a PHP FPM alternative", - "keywords": [ - "framework", - "http", - "php", - "server", - "swoole", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/swoole/issues", - "source": "https://github.com/utopia-php/swoole/tree/0.5.0" - }, - "time": "2022-10-19T22:19:07+00:00" - }, - { - "name": "utopia-php/system", - "version": "0.6.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/system.git", - "reference": "289c4327713deadc9c748b5317d248133a02f245" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/system/zipball/289c4327713deadc9c748b5317d248133a02f245", - "reference": "289c4327713deadc9c748b5317d248133a02f245", - "shasum": "" - }, - "require": { - "laravel/pint": "1.2.*", - "php": ">=7.4" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "squizlabs/php_codesniffer": "^3.6", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\System\\": "src/System" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Torsten Dittmann", - "email": "torsten@appwrite.io" - } - ], - "description": "A simple library for obtaining information about the host's system.", - "keywords": [ - "framework", - "php", - "system", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/system/issues", - "source": "https://github.com/utopia-php/system/tree/0.6.0" - }, - "time": "2022-11-07T13:51:59+00:00" - }, - { - "name": "utopia-php/websocket", - "version": "0.1.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/websocket.git", - "reference": "51fcb86171400d8aa40d76c54593481fd273dab5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/websocket/zipball/51fcb86171400d8aa40d76c54593481fd273dab5", - "reference": "51fcb86171400d8aa40d76c54593481fd273dab5", - "shasum": "" - }, - "require": { - "php": ">=8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5.5", - "swoole/ide-helper": "4.6.6", - "textalk/websocket": "1.5.2", - "vimeo/psalm": "^4.8.1", - "workerman/workerman": "^4.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\WebSocket\\": "src/WebSocket" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Torsten Dittmann", - "email": "torsten@appwrite.io" - } - ], - "description": "A simple abstraction for WebSocket servers.", - "keywords": [ - "framework", - "php", - "upf", - "utopia", - "websocket" - ], - "support": { - "issues": "https://github.com/utopia-php/websocket/issues", - "source": "https://github.com/utopia-php/websocket/tree/0.1.0" - }, - "time": "2021-12-20T10:50:09+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "php": "^7.2 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" - }, - "time": "2022-06-03T18:03:27+00:00" - } - ], - "packages-dev": [ - { - "name": "appwrite/sdk-generator", - "version": "0.28.1", - "source": { - "type": "git", - "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "ed8d3daa66589733b49b11c053d524cdf576ffee" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ed8d3daa66589733b49b11c053d524cdf576ffee", - "reference": "ed8d3daa66589733b49b11c053d524cdf576ffee", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "matthiasmullie/minify": "^1.3.68", - "php": ">=7.0.0", - "twig/twig": "^3.4.1" - }, - "require-dev": { - "brianium/paratest": "^6.4", - "phpunit/phpunit": "^9.5.21" - }, - "type": "library", - "autoload": { - "psr-4": { - "Appwrite\\SDK\\": "src/SDK", - "Appwrite\\Spec\\": "src/Spec" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "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.28.1" - }, - "time": "2022-09-22T09:15:54+00:00" - }, - { - "name": "doctrine/annotations", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "d02c9f3742044e17d5fa8d28d8402a2d95c33302" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/d02c9f3742044e17d5fa8d28d8402a2d95c33302", - "reference": "d02c9f3742044e17d5fa8d28d8402a2d95c33302", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^2 || ^3", - "ext-tokenizer": "*", - "php": "^7.2 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^2.0", - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6", - "vimeo/psalm": "^4.10" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.0" - }, - "time": "2022-12-19T18:17:20+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.5.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-12-30T00:15:36+00:00" - }, - { - "name": "doctrine/lexer", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "84a527db05647743d50373e0ec53a152f2cde568" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/84a527db05647743d50373e0ec53a152f2cde568", - "reference": "84a527db05647743d50373e0ec53a152f2cde568", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.9", - "phpunit/phpunit": "^9.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/3.0.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2022-12-15T16:57:16+00:00" - }, - { - "name": "matthiasmullie/minify", - "version": "1.3.70", - "source": { - "type": "git", - "url": "https://github.com/matthiasmullie/minify.git", - "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/2807d9f9bece6877577ad44acb5c801bb3ae536b", - "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b", - "shasum": "" - }, - "require": { - "ext-pcre": "*", - "matthiasmullie/path-converter": "~1.1", - "php": ">=5.3.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": ">=2.0", - "matthiasmullie/scrapbook": ">=1.3", - "phpunit/phpunit": ">=4.8", - "squizlabs/php_codesniffer": ">=3.0" - }, - "suggest": { - "psr/cache-implementation": "Cache implementation to use with Minify::cache" - }, - "bin": [ - "bin/minifycss", - "bin/minifyjs" - ], - "type": "library", - "autoload": { - "psr-4": { - "MatthiasMullie\\Minify\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthias Mullie", - "email": "minify@mullie.eu", - "homepage": "https://www.mullie.eu", - "role": "Developer" - } - ], - "description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.", - "homepage": "https://github.com/matthiasmullie/minify", - "keywords": [ - "JS", - "css", - "javascript", - "minifier", - "minify" - ], - "support": { - "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.70" - }, - "funding": [ - { - "url": "https://github.com/matthiasmullie", - "type": "github" - } - ], - "time": "2022-12-09T12:56:44+00:00" - }, - { - "name": "matthiasmullie/path-converter", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/matthiasmullie/path-converter.git", - "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/path-converter/zipball/e7d13b2c7e2f2268e1424aaed02085518afa02d9", - "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9", - "shasum": "" - }, - "require": { - "ext-pcre": "*", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "MatthiasMullie\\PathConverter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthias Mullie", - "email": "pathconverter@mullie.eu", - "homepage": "http://www.mullie.eu", - "role": "Developer" - } - ], - "description": "Relative path converter", - "homepage": "http://github.com/matthiasmullie/path-converter", - "keywords": [ - "converter", - "path", - "paths", - "relative" - ], - "support": { - "issues": "https://github.com/matthiasmullie/path-converter/issues", - "source": "https://github.com/matthiasmullie/path-converter/tree/1.1.3" - }, - "time": "2019-02-05T23:41:09+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2022-03-03T13:19:32+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.15.3", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039", - "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3" - }, - "time": "2023-01-16T22:05:37+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" - }, - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "phpbench/container", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/phpbench/container.git", - "reference": "6d555ff7174fca13f9b1ec0b4a089ed41d0ab392" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpbench/container/zipball/6d555ff7174fca13f9b1ec0b4a089ed41d0ab392", - "reference": "6d555ff7174fca13f9b1ec0b4a089ed41d0ab392", - "shasum": "" - }, - "require": { - "psr/container": "^1.0|^2.0", - "symfony/options-resolver": "^4.2 || ^5.0 || ^6.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", - "phpstan/phpstan": "^0.12.52", - "phpunit/phpunit": "^8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "PhpBench\\DependencyInjection\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Leech", - "email": "daniel@dantleech.com" - } - ], - "description": "Simple, configurable, service container.", - "support": { - "issues": "https://github.com/phpbench/container/issues", - "source": "https://github.com/phpbench/container/tree/2.2.1" - }, - "time": "2022-01-25T10:17:35+00:00" - }, - { - "name": "phpbench/dom", - "version": "0.3.2", - "source": { - "type": "git", - "url": "https://github.com/phpbench/dom.git", - "reference": "b013b717832ddbaadf2a40984b04bc66af9a7110" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpbench/dom/zipball/b013b717832ddbaadf2a40984b04bc66af9a7110", - "reference": "b013b717832ddbaadf2a40984b04bc66af9a7110", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "php": "^7.2||^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.18", - "phpstan/phpstan": "^0.12.83", - "phpunit/phpunit": "^8.0||^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpBench\\Dom\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Leech", - "email": "daniel@dantleech.com" - } - ], - "description": "DOM wrapper to simplify working with the PHP DOM implementation", - "support": { - "issues": "https://github.com/phpbench/dom/issues", - "source": "https://github.com/phpbench/dom/tree/0.3.2" - }, - "time": "2021-09-24T15:26:07+00:00" - }, - { - "name": "phpbench/phpbench", - "version": "1.2.8", - "source": { - "type": "git", - "url": "https://github.com/phpbench/phpbench.git", - "reference": "3f7b3c200f86727de7a14bde94adb68a88e1bafc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpbench/phpbench/zipball/3f7b3c200f86727de7a14bde94adb68a88e1bafc", - "reference": "3f7b3c200f86727de7a14bde94adb68a88e1bafc", - "shasum": "" - }, - "require": { - "doctrine/annotations": "^1.13 || ^2.0", - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "ext-tokenizer": "*", - "php": "^7.3 || ^8.0", - "phpbench/container": "^2.1", - "phpbench/dom": "~0.3.1", - "psr/log": "^1.1 || ^2.0 || ^3.0", - "seld/jsonlint": "^1.1", - "symfony/console": "^4.2 || ^5.0 || ^6.0", - "symfony/filesystem": "^4.2 || ^5.0 || ^6.0", - "symfony/finder": "^4.2 || ^5.0 || ^6.0", - "symfony/options-resolver": "^4.2 || ^5.0 || ^6.0", - "symfony/process": "^4.2 || ^5.0 || ^6.0", - "webmozart/glob": "^4.6" - }, - "require-dev": { - "dantleech/invoke": "^2.0", - "friendsofphp/php-cs-fixer": "^3.0", - "jangregor/phpstan-prophecy": "^1.0", - "phpspec/prophecy": "^1.12", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^8.5.8 || ^9.0", - "symfony/error-handler": "^5.2 || ^6.0", - "symfony/var-dumper": "^4.0 || ^5.0 || ^6.0" - }, - "suggest": { - "ext-xdebug": "For Xdebug profiling extension." - }, - "bin": [ - "bin/phpbench" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "autoload": { - "files": [ - "lib/Report/Func/functions.php" - ], - "psr-4": { - "PhpBench\\": "lib/", - "PhpBench\\Extensions\\XDebug\\": "extensions/xdebug/lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Leech", - "email": "daniel@dantleech.com" - } - ], - "description": "PHP Benchmarking Framework", - "support": { - "issues": "https://github.com/phpbench/phpbench/issues", - "source": "https://github.com/phpbench/phpbench/tree/1.2.8" - }, - "funding": [ - { - "url": "https://github.com/dantleech", - "type": "github" - } - ], - "time": "2023-01-14T13:08:42+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", - "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.1", - "phpunit/phpunit": "^9.5", - "rector/rector": "^0.13.9", - "vimeo/psalm": "^4.25" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "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.2" - }, - "time": "2022-10-14T12:47:21+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.16.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be8cac52a0827776ff9ccda8c381ac5b71aeb359", - "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.16.0" - }, - "time": "2022-11-29T15:06:56+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.24", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed", - "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.14", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-01-26T08:26:55+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-12-02T12:48:52+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.5.20", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba", - "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.13", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", - "sebastian/version": "^3.0.2" - }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.5-dev" - } - }, - "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20" - }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-04-01T12:37:26+00:00" - }, - { - "name": "psr/cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" - }, - "time": "2021-02-03T23:26:27+00:00" - }, - { - "name": "psr/container", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" - }, - "time": "2021-11-05T16:47:00+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:08:49+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-09-14T12:41:17+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:52:27+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:10:38+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-04-03T09:37:03+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-09-14T06:03:37+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-02-14T08:28:10+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-28T06:42:11+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" - }, - { - "name": "sebastian/type", - "version": "3.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-09-12T14:47:03+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "seld/jsonlint", - "version": "1.9.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "4211420d25eba80712bff236a98960ef68b866b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/4211420d25eba80712bff236a98960ef68b866b7", - "reference": "4211420d25eba80712bff236a98960ef68b866b7", - "shasum": "" - }, - "require": { - "php": "^5.3 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.5", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" - }, - "bin": [ - "bin/jsonlint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Seld\\JsonLint\\": "src/Seld/JsonLint/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "JSON Linter", - "keywords": [ - "json", - "linter", - "parser", - "validator" - ], - "support": { - "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.9.0" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", - "type": "tidelift" - } - ], - "time": "2022-04-01T13:37:23+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.7.1", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2022-06-18T07:21:10+00:00" - }, - { - "name": "swoole/ide-helper", - "version": "4.8.9", - "source": { - "type": "git", - "url": "https://github.com/swoole/ide-helper.git", - "reference": "8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/swoole/ide-helper/zipball/8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe", - "reference": "8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe", - "shasum": "" - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Team Swoole", - "email": "team@swoole.com" - } - ], - "description": "IDE help files for Swoole.", - "support": { - "issues": "https://github.com/swoole/ide-helper/issues", - "source": "https://github.com/swoole/ide-helper/tree/4.8.9" - }, - "funding": [ - { - "url": "https://gitee.com/swoole/swoole?donate=true", - "type": "custom" - }, - { - "url": "https://github.com/swoole", - "type": "github" - } - ], - "time": "2022-04-18T20:38:04+00:00" - }, - { - "name": "symfony/console", - "version": "v5.4.19", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "dccb8d251a9017d5994c988b034d3e18aaabf740" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/dccb8d251a9017d5994c988b034d3e18aaabf740", - "reference": "dccb8d251a9017d5994c988b034d3e18aaabf740", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" - }, - "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" - }, - "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command line", - "console", - "terminal" - ], - "support": { - "source": "https://github.com/symfony/console/tree/v5.4.19" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-01-01T08:32:19+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.3-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-25T10:21:52+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v5.4.19", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "648bfaca6a494f3e22378123bcee2894045dc9d8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/648bfaca6a494f3e22378123bcee2894045dc9d8", - "reference": "648bfaca6a494f3e22378123bcee2894045dc9d8", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.19" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-01-14T19:14:44+00:00" - }, - { - "name": "symfony/finder", - "version": "v5.4.19", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "6071aebf810ad13fe8200c224f36103abb37cf1f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/6071aebf810ad13fe8200c224f36103abb37cf1f", - "reference": "6071aebf810ad13fe8200c224f36103abb37cf1f", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.19" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-01-14T19:14:44+00:00" - }, - { - "name": "symfony/options-resolver", - "version": "v5.4.19", - "source": { - "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "b03c99236445492f20c61666e8f7e5d388b078e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b03c99236445492f20c61666e8f7e5d388b078e5", - "reference": "b03c99236445492f20c61666e8f7e5d388b078e5", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an improved replacement for the array_replace PHP function", - "homepage": "https://symfony.com", - "keywords": [ - "config", - "configuration", - "options" - ], - "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.19" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-01-01T08:32:19+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's grapheme_* functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/process", - "version": "v5.4.19", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "c5ba874c9b636dbccf761e22ce750e88ec3f55e1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/c5ba874c9b636dbccf761e22ce750e88ec3f55e1", - "reference": "c5ba874c9b636dbccf761e22ce750e88ec3f55e1", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/process/tree/v5.4.19" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-01-01T08:32:19+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v3.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/aac98028c69df04ee77eb69b96b86ee51fbf4b75", - "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/container": "^2.0" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.3-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-25T10:21:52+00:00" - }, - { - "name": "symfony/string", - "version": "v6.2.5", - "source": { - "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0", - "reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/translation-contracts": "<2.0" - }, - "require-dev": { - "symfony/error-handler": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/intl": "^6.2", - "symfony/translation-contracts": "^2.0|^3.0", - "symfony/var-exporter": "^5.4|^6.0" - }, - "type": "library", - "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\String\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", - "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], - "support": { - "source": "https://github.com/symfony/string/tree/v6.2.5" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-01-01T08:38:09+00:00" - }, - { - "name": "textalk/websocket", - "version": "1.5.7", - "source": { - "type": "git", - "url": "https://github.com/Textalk/websocket-php.git", - "reference": "1712325e99b6bf869ccbf9bf41ab749e7328ea46" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Textalk/websocket-php/zipball/1712325e99b6bf869ccbf9bf41ab749e7328ea46", - "reference": "1712325e99b6bf869ccbf9bf41ab749e7328ea46", - "shasum": "" - }, - "require": { - "php": "^7.2 | ^8.0", - "psr/log": "^1 | ^2 | ^3" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.0", - "phpunit/phpunit": "^8.0|^9.0", - "squizlabs/php_codesniffer": "^3.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "WebSocket\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Fredrik Liljegren" - }, - { - "name": "Sören Jensen", - "email": "soren@abicart.se" - } - ], - "description": "WebSocket client and server", - "support": { - "issues": "https://github.com/Textalk/websocket-php/issues", - "source": "https://github.com/Textalk/websocket-php/tree/1.5.7" - }, - "time": "2022-03-29T09:46:59+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "twig/twig", - "version": "v3.5.0", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/3ffcf4b7d890770466da3b2666f82ac054e7ec72", - "reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" - }, - "require-dev": { - "psr/container": "^1.0", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.5-dev" - } - }, - "autoload": { - "psr-4": { - "Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Twig Team", - "role": "Contributors" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "https://twig.symfony.com", - "keywords": [ - "templating" - ], - "support": { - "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.5.0" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/twig/twig", - "type": "tidelift" - } - ], - "time": "2022-12-27T12:28:18+00:00" - }, - { - "name": "webmozart/glob", - "version": "4.6.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/glob.git", - "reference": "3c17f7dec3d9d0e87b575026011f2e75a56ed655" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/glob/zipball/3c17f7dec3d9d0e87b575026011f2e75a56ed655", - "reference": "3c17f7dec3d9d0e87b575026011f2e75a56ed655", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8.0.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5", - "symfony/filesystem": "^5.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.1-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Glob\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "A PHP implementation of Ant's glob.", - "support": { - "issues": "https://github.com/webmozarts/glob/issues", - "source": "https://github.com/webmozarts/glob/tree/4.6.0" - }, - "time": "2022-05-24T19:45:58+00:00" - } - ], - "aliases": [ - { - "package": "utopia-php/database", - "version": "dev-increment", - "alias": "0.28.0", - "alias_normalized": "0.28.0.0" - } - ], - "minimum-stability": "stable", - "stability-flags": { - "utopia-php/database": 20 - }, - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=8.0.0", - "ext-curl": "*", - "ext-imagick": "*", - "ext-mbstring": "*", - "ext-json": "*", - "ext-yaml": "*", - "ext-dom": "*", - "ext-redis": "*", - "ext-swoole": "*", - "ext-pdo": "*", - "ext-openssl": "*", - "ext-zlib": "*", - "ext-sockets": "*" - }, - "platform-dev": { - "ext-fileinfo": "*" - }, - "platform-overrides": { - "php": "8.0" - }, - "plugin-api-version": "2.2.0" -} From 149846e6abfc3f1e633552d0881ec76901d51464 Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 1 Feb 2023 10:31:04 +0200 Subject: [PATCH 66/94] Migration v17 --- composer.lock | 5090 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 5090 insertions(+) create mode 100644 composer.lock diff --git a/composer.lock b/composer.lock new file mode 100644 index 000000000..a1d6075d7 --- /dev/null +++ b/composer.lock @@ -0,0 +1,5090 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "36ef20efb91c04f1985f7dbaf52450f5", + "packages": [ + { + "name": "adhocore/jwt", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/adhocore/php-jwt.git", + "reference": "6c434af7170090bb7a8880d2bc220a2254ba7899" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/adhocore/php-jwt/zipball/6c434af7170090bb7a8880d2bc220a2254ba7899", + "reference": "6c434af7170090bb7a8880d2bc220a2254ba7899", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.5 || ^7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ahc\\Jwt\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jitendra Adhikari", + "email": "jiten.adhikary@gmail.com" + } + ], + "description": "Ultra lightweight JSON web token (JWT) library for PHP5.5+.", + "keywords": [ + "auth", + "json-web-token", + "jwt", + "jwt-auth", + "jwt-php", + "token" + ], + "support": { + "issues": "https://github.com/adhocore/php-jwt/issues", + "source": "https://github.com/adhocore/php-jwt/tree/1.1.2" + }, + "funding": [ + { + "url": "https://paypal.me/ji10", + "type": "custom" + } + ], + "time": "2021-02-20T09:56:44+00:00" + }, + { + "name": "appwrite/php-clamav", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/appwrite/php-clamav.git", + "reference": "61d00f24f9e7766fbba233e7b8d09c5475388073" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/appwrite/php-clamav/zipball/61d00f24f9e7766fbba233e7b8d09c5475388073", + "reference": "61d00f24f9e7766fbba233e7b8d09c5475388073", + "shasum": "" + }, + "require": { + "ext-sockets": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Appwrite\\ClamAV\\": "src/ClamAV" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "ClamAV network and pipe client for PHP", + "keywords": [ + "anti virus", + "appwrite", + "clamav", + "php" + ], + "support": { + "issues": "https://github.com/appwrite/php-clamav/issues", + "source": "https://github.com/appwrite/php-clamav/tree/1.1.0" + }, + "time": "2020-10-02T05:23:46+00:00" + }, + { + "name": "appwrite/php-runtimes", + "version": "0.11.1", + "source": { + "type": "git", + "url": "https://github.com/appwrite/runtimes.git", + "reference": "9d74a477ba3333cbcfac565c46fcf19606b7b603" + }, + "require": { + "php": ">=8.0", + "utopia-php/system": "0.6.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Appwrite\\Runtimes\\": "src/Runtimes" + } + }, + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Torsten Dittmann", + "email": "torsten@appwrite.io" + } + ], + "description": "Appwrite repository for Cloud Function runtimes that contains the configurations and tests for all of the Appwrite runtime environments.", + "keywords": [ + "appwrite", + "php", + "runtimes" + ], + "time": "2022-11-07T16:45:52+00:00" + }, + { + "name": "chillerlan/php-qrcode", + "version": "4.3.3", + "source": { + "type": "git", + "url": "https://github.com/chillerlan/php-qrcode.git", + "reference": "6356b246948ac1025882b3f55e7c68ebd4515ae3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/6356b246948ac1025882b3f55e7c68ebd4515ae3", + "reference": "6356b246948ac1025882b3f55e7c68ebd4515ae3", + "shasum": "" + }, + "require": { + "chillerlan/php-settings-container": "^2.1", + "ext-mbstring": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phan/phan": "^5.3", + "phpunit/phpunit": "^9.5", + "setasign/fpdf": "^1.8.2" + }, + "suggest": { + "chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.", + "setasign/fpdf": "Required to use the QR FPDF output." + }, + "type": "library", + "autoload": { + "psr-4": { + "chillerlan\\QRCode\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kazuhiko Arase", + "homepage": "https://github.com/kazuhikoarase" + }, + { + "name": "Smiley", + "email": "smiley@chillerlan.net", + "homepage": "https://github.com/codemasher" + }, + { + "name": "Contributors", + "homepage": "https://github.com/chillerlan/php-qrcode/graphs/contributors" + } + ], + "description": "A QR code generator. PHP 7.4+", + "homepage": "https://github.com/chillerlan/php-qrcode", + "keywords": [ + "phpqrcode", + "qr", + "qr code", + "qrcode", + "qrcode-generator" + ], + "support": { + "issues": "https://github.com/chillerlan/php-qrcode/issues", + "source": "https://github.com/chillerlan/php-qrcode/tree/4.3.3" + }, + "funding": [ + { + "url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", + "type": "custom" + }, + { + "url": "https://ko-fi.com/codemasher", + "type": "ko_fi" + } + ], + "time": "2021-11-25T22:38:09+00:00" + }, + { + "name": "chillerlan/php-settings-container", + "version": "2.1.4", + "source": { + "type": "git", + "url": "https://github.com/chillerlan/php-settings-container.git", + "reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/1beb7df3c14346d4344b0b2e12f6f9a74feabd4a", + "reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phan/phan": "^5.3", + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "chillerlan\\Settings\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Smiley", + "email": "smiley@chillerlan.net", + "homepage": "https://github.com/codemasher" + } + ], + "description": "A container class for immutable settings objects. Not a DI container. PHP 7.4+", + "homepage": "https://github.com/chillerlan/php-settings-container", + "keywords": [ + "PHP7", + "Settings", + "configuration", + "container", + "helper" + ], + "support": { + "issues": "https://github.com/chillerlan/php-settings-container/issues", + "source": "https://github.com/chillerlan/php-settings-container" + }, + "funding": [ + { + "url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", + "type": "custom" + }, + { + "url": "https://ko-fi.com/codemasher", + "type": "ko_fi" + } + ], + "time": "2022-07-05T22:32:14+00:00" + }, + { + "name": "colinmollenhour/credis", + "version": "v1.14.0", + "source": { + "type": "git", + "url": "https://github.com/colinmollenhour/credis.git", + "reference": "dccc8a46586475075fbb012d8bd523b8a938c2dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/dccc8a46586475075fbb012d8bd523b8a938c2dc", + "reference": "dccc8a46586475075fbb012d8bd523b8a938c2dc", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "suggest": { + "ext-redis": "Improved performance for communicating with redis" + }, + "type": "library", + "autoload": { + "classmap": [ + "Client.php", + "Cluster.php", + "Sentinel.php", + "Module.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Colin Mollenhour", + "email": "colin@mollenhour.com" + } + ], + "description": "Credis is a lightweight interface to the Redis key-value store which wraps the phpredis library when available for better performance.", + "homepage": "https://github.com/colinmollenhour/credis", + "support": { + "issues": "https://github.com/colinmollenhour/credis/issues", + "source": "https://github.com/colinmollenhour/credis/tree/v1.14.0" + }, + "time": "2022-11-09T01:18:39+00:00" + }, + { + "name": "composer/package-versions-deprecated", + "version": "1.11.99.5", + "source": { + "type": "git", + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0", + "php": "^7 || ^8" + }, + "replace": { + "ocramius/package-versions": "1.11.99" + }, + "require-dev": { + "composer/composer": "^1.9.3 || ^2.0@dev", + "ext-zip": "^1.13", + "phpunit/phpunit": "^6.5 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "support": { + "issues": "https://github.com/composer/package-versions-deprecated/issues", + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-01-17T14:14:24+00:00" + }, + { + "name": "dragonmantank/cron-expression", + "version": "v3.3.1", + "source": { + "type": "git", + "url": "https://github.com/dragonmantank/cron-expression.git", + "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/be85b3f05b46c39bbc0d95f6c071ddff669510fa", + "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0", + "webmozart/assert": "^1.0" + }, + "replace": { + "mtdowling/cron-expression": "^1.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-webmozart-assert": "^1.0", + "phpunit/phpunit": "^7.0|^8.0|^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Cron\\": "src/Cron/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Tankersley", + "email": "chris@ctankersley.com", + "homepage": "https://github.com/dragonmantank" + } + ], + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": [ + "cron", + "schedule" + ], + "support": { + "issues": "https://github.com/dragonmantank/cron-expression/issues", + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.1" + }, + "funding": [ + { + "url": "https://github.com/dragonmantank", + "type": "github" + } + ], + "time": "2022-01-18T15:43:28+00:00" + }, + { + "name": "jean85/pretty-package-versions", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/Jean85/pretty-package-versions.git", + "reference": "1e0104b46f045868f11942aea058cd7186d6c303" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/1e0104b46f045868f11942aea058cd7186d6c303", + "reference": "1e0104b46f045868f11942aea058cd7186d6c303", + "shasum": "" + }, + "require": { + "composer/package-versions-deprecated": "^1.8.0", + "php": "^7.0|^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0|^8.5|^9.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Jean85\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alessandro Lai", + "email": "alessandro.lai85@gmail.com" + } + ], + "description": "A wrapper for ocramius/package-versions to get pretty versions strings", + "keywords": [ + "composer", + "package", + "release", + "versions" + ], + "support": { + "issues": "https://github.com/Jean85/pretty-package-versions/issues", + "source": "https://github.com/Jean85/pretty-package-versions/tree/1.6.0" + }, + "time": "2021-02-04T16:20:16+00:00" + }, + { + "name": "laravel/pint", + "version": "v1.2.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/pint.git", + "reference": "e60e2112ee779ce60f253695b273d1646a17d6f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/pint/zipball/e60e2112ee779ce60f253695b273d1646a17d6f1", + "reference": "e60e2112ee779ce60f253695b273d1646a17d6f1", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "ext-tokenizer": "*", + "ext-xml": "*", + "php": "^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.11.0", + "illuminate/view": "^9.32.0", + "laravel-zero/framework": "^9.2.0", + "mockery/mockery": "^1.5.1", + "nunomaduro/larastan": "^2.2.0", + "nunomaduro/termwind": "^1.14.0", + "pestphp/pest": "^1.22.1" + }, + "bin": [ + "builds/pint" + ], + "type": "project", + "autoload": { + "psr-4": { + "App\\": "app/", + "Database\\Seeders\\": "database/seeders/", + "Database\\Factories\\": "database/factories/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "An opinionated code formatter for PHP.", + "homepage": "https://laravel.com", + "keywords": [ + "format", + "formatter", + "lint", + "linter", + "php" + ], + "support": { + "issues": "https://github.com/laravel/pint/issues", + "source": "https://github.com/laravel/pint" + }, + "time": "2022-11-29T16:25:20+00:00" + }, + { + "name": "matomo/device-detector", + "version": "6.0.0", + "source": { + "type": "git", + "url": "https://github.com/matomo-org/device-detector.git", + "reference": "7fc2af3af62bd69e6e3404d561e371a83c112be9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/matomo-org/device-detector/zipball/7fc2af3af62bd69e6e3404d561e371a83c112be9", + "reference": "7fc2af3af62bd69e6e3404d561e371a83c112be9", + "shasum": "" + }, + "require": { + "mustangostang/spyc": "*", + "php": "^7.2|^8.0" + }, + "replace": { + "piwik/device-detector": "self.version" + }, + "require-dev": { + "matthiasmullie/scrapbook": "^1.4.7", + "mayflower/mo4-coding-standard": "^v8.0.0", + "phpstan/phpstan": "^0.12.52", + "phpunit/phpunit": "^8.5.8", + "psr/cache": "^1.0.1", + "psr/simple-cache": "^1.0.1", + "symfony/yaml": "^5.1.7" + }, + "suggest": { + "doctrine/cache": "Can directly be used for caching purpose", + "ext-yaml": "Necessary for using the Pecl YAML parser" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeviceDetector\\": "" + }, + "exclude-from-classmap": [ + "Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "The Matomo Team", + "email": "hello@matomo.org", + "homepage": "https://matomo.org/team/" + } + ], + "description": "The Universal Device Detection library, that parses User Agents and detects devices (desktop, tablet, mobile, tv, cars, console, etc.), clients (browsers, media players, mobile apps, feed readers, libraries, etc), operating systems, devices, brands and models.", + "homepage": "https://matomo.org", + "keywords": [ + "devicedetection", + "parser", + "useragent" + ], + "support": { + "forum": "https://forum.matomo.org/", + "issues": "https://github.com/matomo-org/device-detector/issues", + "source": "https://github.com/matomo-org/matomo", + "wiki": "https://dev.matomo.org/" + }, + "time": "2022-04-11T09:58:17+00:00" + }, + { + "name": "mongodb/mongodb", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/mongodb/mongo-php-library.git", + "reference": "953dbc19443aa9314c44b7217a16873347e6840d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/953dbc19443aa9314c44b7217a16873347e6840d", + "reference": "953dbc19443aa9314c44b7217a16873347e6840d", + "shasum": "" + }, + "require": { + "ext-hash": "*", + "ext-json": "*", + "ext-mongodb": "^1.8.1", + "jean85/pretty-package-versions": "^1.2", + "php": "^7.0 || ^8.0", + "symfony/polyfill-php80": "^1.19" + }, + "require-dev": { + "squizlabs/php_codesniffer": "^3.5, <3.5.5", + "symfony/phpunit-bridge": "5.x-dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "MongoDB\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Andreas Braun", + "email": "andreas.braun@mongodb.com" + }, + { + "name": "Jeremy Mikola", + "email": "jmikola@gmail.com" + } + ], + "description": "MongoDB driver library", + "homepage": "https://jira.mongodb.org/browse/PHPLIB", + "keywords": [ + "database", + "driver", + "mongodb", + "persistence" + ], + "support": { + "issues": "https://github.com/mongodb/mongo-php-library/issues", + "source": "https://github.com/mongodb/mongo-php-library/tree/1.8.0" + }, + "time": "2020-11-25T12:26:02+00:00" + }, + { + "name": "mustangostang/spyc", + "version": "0.6.3", + "source": { + "type": "git", + "url": "git@github.com:mustangostang/spyc.git", + "reference": "4627c838b16550b666d15aeae1e5289dd5b77da0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mustangostang/spyc/zipball/4627c838b16550b666d15aeae1e5289dd5b77da0", + "reference": "4627c838b16550b666d15aeae1e5289dd5b77da0", + "shasum": "" + }, + "require": { + "php": ">=5.3.1" + }, + "require-dev": { + "phpunit/phpunit": "4.3.*@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.5.x-dev" + } + }, + "autoload": { + "files": [ + "Spyc.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "mustangostang", + "email": "vlad.andersen@gmail.com" + } + ], + "description": "A simple YAML loader/dumper class for PHP", + "homepage": "https://github.com/mustangostang/spyc/", + "keywords": [ + "spyc", + "yaml", + "yml" + ], + "time": "2019-09-10T13:16:29+00:00" + }, + { + "name": "phpmailer/phpmailer", + "version": "v6.6.0", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e43bac82edc26ca04b36143a48bde1c051cfd5b1", + "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-filter": "*", + "ext-hash": "*", + "php": ">=5.5.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "doctrine/annotations": "^1.2", + "php-parallel-lint/php-console-highlighter": "^0.5.0", + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.3.5", + "roave/security-advisories": "dev-latest", + "squizlabs/php_codesniffer": "^3.6.2", + "yoast/phpunit-polyfills": "^1.0.0" + }, + "suggest": { + "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-only" + ], + "authors": [ + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "support": { + "issues": "https://github.com/PHPMailer/PHPMailer/issues", + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.0" + }, + "funding": [ + { + "url": "https://github.com/Synchro", + "type": "github" + } + ], + "time": "2022-02-28T15:31:21+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "resque/php-resque", + "version": "v1.3.6", + "source": { + "type": "git", + "url": "https://github.com/resque/php-resque.git", + "reference": "fe41c04763699b1318d97ed14cc78583e9380161" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/resque/php-resque/zipball/fe41c04763699b1318d97ed14cc78583e9380161", + "reference": "fe41c04763699b1318d97ed14cc78583e9380161", + "shasum": "" + }, + "require": { + "colinmollenhour/credis": "~1.7", + "php": ">=5.6.0", + "psr/log": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "suggest": { + "ext-pcntl": "REQUIRED for forking processes on platforms that support it (so anything but Windows).", + "ext-proctitle": "Allows php-resque to rename the title of UNIX processes to show the status of a worker.", + "ext-redis": "Native PHP extension for Redis connectivity. Credis will automatically utilize when available." + }, + "bin": [ + "bin/resque", + "bin/resque-scheduler" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Resque": "lib", + "ResqueScheduler": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dan Hunsaker", + "email": "danhunsaker+resque@gmail.com", + "role": "Maintainer" + }, + { + "name": "Rajib Ahmed", + "homepage": "https://github.com/rajibahmed", + "role": "Maintainer" + }, + { + "name": "Steve Klabnik", + "email": "steve@steveklabnik.com", + "role": "Maintainer" + }, + { + "name": "Chris Boulton", + "email": "chris@bigcommerce.com", + "role": "Creator" + } + ], + "description": "Redis backed library for creating background jobs and processing them later. Based on resque for Ruby.", + "homepage": "http://www.github.com/resque/php-resque/", + "keywords": [ + "background", + "job", + "redis", + "resque" + ], + "support": { + "issues": "https://github.com/resque/php-resque/issues", + "source": "https://github.com/resque/php-resque/tree/v1.3.6" + }, + "time": "2020-04-16T16:39:50+00:00" + }, + { + "name": "slickdeals/statsd", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/Slickdeals/statsd-php.git", + "reference": "225588a0a079e145359049f6e5e23eedb1b4c17f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Slickdeals/statsd-php/zipball/225588a0a079e145359049f6e5e23eedb1b4c17f", + "reference": "225588a0a079e145359049f6e5e23eedb1b4c17f", + "shasum": "" + }, + "require": { + "php": ">= 7.3 || ^8" + }, + "replace": { + "domnikl/statsd": "self.version" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.0", + "phpunit/phpunit": "^9", + "vimeo/psalm": "^4.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Domnikl\\Statsd\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dominik Liebler", + "email": "liebler.dominik@gmail.com" + } + ], + "description": "a PHP client for statsd", + "homepage": "https://github.com/Slickdeals/statsd-php", + "keywords": [ + "Metrics", + "monitoring", + "statistics", + "statsd", + "udp" + ], + "support": { + "issues": "https://github.com/Slickdeals/statsd-php/issues", + "source": "https://github.com/Slickdeals/statsd-php/tree/3.1.0" + }, + "time": "2021-06-04T20:33:46+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "utopia-php/abuse", + "version": "0.16.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/abuse.git", + "reference": "6370d9150425460416583feba0990504ac789e98" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/abuse/zipball/6370d9150425460416583feba0990504ac789e98", + "reference": "6370d9150425460416583feba0990504ac789e98", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-pdo": "*", + "php": ">=8.0", + "utopia-php/database": "0.28.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.4", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Abuse\\": "src/Abuse" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple abuse library to manage application usage limits", + "keywords": [ + "Abuse", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/abuse/issues", + "source": "https://github.com/utopia-php/abuse/tree/0.16.0" + }, + "time": "2022-10-31T14:46:41+00:00" + }, + { + "name": "utopia-php/analytics", + "version": "0.2.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/analytics.git", + "reference": "adfc2d057a7f6ab618a77c8a20ed3e35485ff416" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/analytics/zipball/adfc2d057a7f6ab618a77c8a20ed3e35485ff416", + "reference": "adfc2d057a7f6ab618a77c8a20ed3e35485ff416", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Analytics\\": "src/Analytics" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Torsten Dittmann", + "email": "torsten@appwrite.io" + } + ], + "description": "A simple library to track events & users.", + "keywords": [ + "analytics", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/analytics/issues", + "source": "https://github.com/utopia-php/analytics/tree/0.2.0" + }, + "time": "2021-03-23T21:33:07+00:00" + }, + { + "name": "utopia-php/audit", + "version": "0.17.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/audit.git", + "reference": "455471bd4de8d74026809e843f8c9740eb32922c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/audit/zipball/455471bd4de8d74026809e843f8c9740eb32922c", + "reference": "455471bd4de8d74026809e843f8c9740eb32922c", + "shasum": "" + }, + "require": { + "ext-pdo": "*", + "php": ">=8.0", + "utopia-php/database": "0.28.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Audit\\": "src/Audit" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A simple audit library to manage application users logs", + "keywords": [ + "Audit", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/audit/issues", + "source": "https://github.com/utopia-php/audit/tree/0.17.0" + }, + "time": "2022-10-31T14:44:52+00:00" + }, + { + "name": "utopia-php/cache", + "version": "0.8.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/cache.git", + "reference": "212e66100a1f32e674fca5d9bc317cc998303089" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/cache/zipball/212e66100a1f32e674fca5d9bc317cc998303089", + "reference": "212e66100a1f32e674fca5d9bc317cc998303089", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-memcached": "*", + "ext-redis": "*", + "php": ">=8.0" + }, + "require-dev": { + "laravel/pint": "1.2.*", + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.13.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Cache\\": "src/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A simple cache library to manage application cache storing, loading and purging", + "keywords": [ + "cache", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/cache/issues", + "source": "https://github.com/utopia-php/cache/tree/0.8.0" + }, + "time": "2022-10-16T16:48:09+00:00" + }, + { + "name": "utopia-php/cli", + "version": "0.14.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/cli.git", + "reference": "c30ef985a4e739758a0d95eb0706b357b6d8c086" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/cli/zipball/c30ef985a4e739758a0d95eb0706b357b6d8c086", + "reference": "c30ef985a4e739758a0d95eb0706b357b6d8c086", + "shasum": "" + }, + "require": { + "php": ">=7.4", + "utopia-php/framework": "0.*.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "squizlabs/php_codesniffer": "^3.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\CLI\\": "src/CLI" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple CLI library to manage command line applications", + "keywords": [ + "cli", + "command line", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/cli/issues", + "source": "https://github.com/utopia-php/cli/tree/0.14.0" + }, + "time": "2022-10-09T10:19:07+00:00" + }, + { + "name": "utopia-php/config", + "version": "0.2.2", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/config.git", + "reference": "a3d7bc0312d7150d5e04b1362dc34b2b136908cc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/config/zipball/a3d7bc0312d7150d5e04b1362dc34b2b136908cc", + "reference": "a3d7bc0312d7150d5e04b1362dc34b2b136908cc", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Config\\": "src/Config" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple Config library to managing application config variables", + "keywords": [ + "config", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/config/issues", + "source": "https://github.com/utopia-php/config/tree/0.2.2" + }, + "time": "2020-10-24T09:49:09+00:00" + }, + { + "name": "utopia-php/database", + "version": "dev-increment", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/database.git", + "reference": "fc0a8bfc9826e1e64521a8e7a95904f9a999d6fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/database/zipball/fc0a8bfc9826e1e64521a8e7a95904f9a999d6fb", + "reference": "fc0a8bfc9826e1e64521a8e7a95904f9a999d6fb", + "shasum": "" + }, + "require": { + "ext-pdo": "*", + "php": ">=8.0", + "utopia-php/cache": "0.8.*", + "utopia-php/framework": "0.*.*", + "utopia-php/mongo": "0.0.2" + }, + "require-dev": { + "ext-mongodb": "*", + "ext-redis": "*", + "fakerphp/faker": "^1.14", + "mongodb/mongodb": "1.8.0", + "phpunit/phpunit": "^9.4", + "swoole/ide-helper": "4.8.0", + "utopia-php/cli": "^0.11.0", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Database\\": "src/Database" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A simple library to manage application persistency using multiple database adapters", + "keywords": [ + "database", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/database/issues", + "source": "https://github.com/utopia-php/database/tree/increment" + }, + "time": "2022-12-08T08:59:37+00:00" + }, + { + "name": "utopia-php/domains", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/domains.git", + "reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/domains/zipball/1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73", + "reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Domains\\": "src/Domains" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "Utopia Domains library is simple and lite library for parsing web domains. This library is aiming to be as simple and easy to learn and use.", + "keywords": [ + "domains", + "framework", + "icann", + "php", + "public suffix", + "tld", + "tld extract", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/domains/issues", + "source": "https://github.com/utopia-php/domains/tree/master" + }, + "time": "2020-02-23T07:40:02+00:00" + }, + { + "name": "utopia-php/dsn", + "version": "0.1.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/dsn.git", + "reference": "17a5935eab1b89fb4b95600db50a1b6d5faa6cea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/dsn/zipball/17a5935eab1b89fb4b95600db50a1b6d5faa6cea", + "reference": "17a5935eab1b89fb4b95600db50a1b6d5faa6cea", + "shasum": "" + }, + "require": { + "php": ">=8.0" + }, + "require-dev": { + "laravel/pint": "1.2.*", + "phpunit/phpunit": "^9.3", + "squizlabs/php_codesniffer": "^3.6", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\DSN\\": "src/DSN" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A simple library for parsing and managing Data Source Names ( DSNs )", + "keywords": [ + "dsn", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/dsn/issues", + "source": "https://github.com/utopia-php/dsn/tree/0.1.0" + }, + "time": "2022-10-26T10:06:20+00:00" + }, + { + "name": "utopia-php/framework", + "version": "0.25.1", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/framework.git", + "reference": "2391b397135586b2100d39e338827bef8d2f4ad0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/2391b397135586b2100d39e338827bef8d2f4ad0", + "reference": "2391b397135586b2100d39e338827bef8d2f4ad0", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "require-dev": { + "laravel/pint": "^1.2", + "phpunit/phpunit": "^9.5.25", + "vimeo/psalm": "4.27.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A simple, light and advanced PHP framework", + "keywords": [ + "framework", + "php", + "upf" + ], + "support": { + "issues": "https://github.com/utopia-php/framework/issues", + "source": "https://github.com/utopia-php/framework/tree/0.25.1" + }, + "time": "2022-11-23T18:22:23+00:00" + }, + { + "name": "utopia-php/image", + "version": "0.5.4", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/image.git", + "reference": "ca5f436f9aa22dedaa6648f24f3687733808e336" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/image/zipball/ca5f436f9aa22dedaa6648f24f3687733808e336", + "reference": "ca5f436f9aa22dedaa6648f24f3687733808e336", + "shasum": "" + }, + "require": { + "ext-imagick": "*", + "php": ">=8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.13.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Image\\": "src/Image" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple Image manipulation library", + "keywords": [ + "framework", + "image", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/image/issues", + "source": "https://github.com/utopia-php/image/tree/0.5.4" + }, + "time": "2022-05-11T12:30:41+00:00" + }, + { + "name": "utopia-php/locale", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/locale.git", + "reference": "c2d9358d0fe2f6b6ed5448369f9d1e430c615447" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/locale/zipball/c2d9358d0fe2f6b6ed5448369f9d1e430c615447", + "reference": "c2d9358d0fe2f6b6ed5448369f9d1e430c615447", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Locale\\": "src/Locale" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple locale library to manage application translations", + "keywords": [ + "framework", + "locale", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/locale/issues", + "source": "https://github.com/utopia-php/locale/tree/0.4.0" + }, + "time": "2021-07-24T11:35:55+00:00" + }, + { + "name": "utopia-php/logger", + "version": "0.3.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/logger.git", + "reference": "079656cb5169ca9600861eda0b6819199e3d4a57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/logger/zipball/079656cb5169ca9600861eda0b6819199e3d4a57", + "reference": "079656cb5169ca9600861eda0b6819199e3d4a57", + "shasum": "" + }, + "require": { + "php": ">=8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Logger\\": "src/Logger" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Matej Bačo", + "email": "matej@appwrite.io" + }, + { + "name": "Christy Jacob", + "email": "christy@appwrite.io" + } + ], + "description": "Utopia Logger library is simple and lite library for logging information, such as errors or warnings. This library is aiming to be as simple and easy to learn and use.", + "keywords": [ + "appsignal", + "errors", + "framework", + "logger", + "logging", + "logs", + "php", + "raygun", + "sentry", + "upf", + "utopia", + "warnings" + ], + "support": { + "issues": "https://github.com/utopia-php/logger/issues", + "source": "https://github.com/utopia-php/logger/tree/0.3.0" + }, + "time": "2022-03-18T10:56:57+00:00" + }, + { + "name": "utopia-php/messaging", + "version": "0.1.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/messaging.git", + "reference": "501272fad666f06bec8f130076862e7981a73f8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/messaging/zipball/501272fad666f06bec8f130076862e7981a73f8c", + "reference": "501272fad666f06bec8f130076862e7981a73f8c", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=8.0.0" + }, + "require-dev": { + "phpmailer/phpmailer": "6.6.*", + "phpunit/phpunit": "9.5.*", + "squizlabs/php_codesniffer": "^3.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Messaging\\": "src/Utopia/Messaging" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jake Barnby", + "email": "jake@appwrite.io" + } + ], + "description": "A simple, light and advanced PHP messaging library", + "keywords": [ + "library", + "messaging", + "php", + "upf", + "utopia", + "utopia-php" + ], + "support": { + "issues": "https://github.com/utopia-php/messaging/issues", + "source": "https://github.com/utopia-php/messaging/tree/0.1.0" + }, + "time": "2022-09-29T11:22:48+00:00" + }, + { + "name": "utopia-php/mongo", + "version": "0.0.2", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/mongo.git", + "reference": "62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/mongo/zipball/62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e", + "reference": "62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e", + "shasum": "" + }, + "require": { + "ext-mongodb": "*", + "mongodb/mongodb": "1.8.0", + "php": ">=8.0" + }, + "require-dev": { + "fakerphp/faker": "^1.14", + "laravel/pint": "1.2.*", + "phpstan/phpstan": "1.8.*", + "phpunit/phpunit": "^9.4", + "swoole/ide-helper": "4.8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Mongo\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Wess", + "email": "wess@appwrite.io" + } + ], + "description": "A simple library to manage Mongo database", + "keywords": [ + "database", + "mongo", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/mongo/issues", + "source": "https://github.com/utopia-php/mongo/tree/0.0.2" + }, + "time": "2022-11-08T11:58:46+00:00" + }, + { + "name": "utopia-php/orchestration", + "version": "0.9.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/orchestration.git", + "reference": "1d4f66684b8c4927f31b695817eae6d84aafd172" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/orchestration/zipball/1d4f66684b8c4927f31b695817eae6d84aafd172", + "reference": "1d4f66684b8c4927f31b695817eae6d84aafd172", + "shasum": "" + }, + "require": { + "php": ">=8.0", + "utopia-php/cli": "0.14.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Orchestration\\": "src/Orchestration" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Lite & fast micro PHP abstraction library for container orchestration", + "keywords": [ + "docker", + "framework", + "kubernetes", + "orchestration", + "php", + "swarm", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/orchestration/issues", + "source": "https://github.com/utopia-php/orchestration/tree/0.9.0" + }, + "time": "2022-11-09T17:38:00+00:00" + }, + { + "name": "utopia-php/platform", + "version": "0.3.1", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/platform.git", + "reference": "fe9f64420957dc8fb6201d22b499572f021411e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/platform/zipball/fe9f64420957dc8fb6201d22b499572f021411e4", + "reference": "fe9f64420957dc8fb6201d22b499572f021411e4", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-redis": "*", + "php": ">=8.0", + "utopia-php/cli": "0.14.*", + "utopia-php/framework": "0.25.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "squizlabs/php_codesniffer": "^3.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Platform\\": "src/Platform" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Light and Fast Platform Library", + "keywords": [ + "cache", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/platform/issues", + "source": "https://github.com/utopia-php/platform/tree/0.3.1" + }, + "time": "2022-11-10T07:04:24+00:00" + }, + { + "name": "utopia-php/pools", + "version": "0.4.2", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/pools.git", + "reference": "d2870ab74b31b7f4027799f082e85122154f8bed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/pools/zipball/d2870ab74b31b7f4027799f082e85122154f8bed", + "reference": "d2870ab74b31b7f4027799f082e85122154f8bed", + "shasum": "" + }, + "require": { + "php": ">=8.0" + }, + "require-dev": { + "laravel/pint": "1.2.*", + "phpstan/phpstan": "1.8.*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Pools\\": "src/Pools" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Team Appwrite", + "email": "team@appwrite.io" + } + ], + "description": "A simple library to manage connection pools", + "keywords": [ + "framework", + "php", + "pools", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/pools/issues", + "source": "https://github.com/utopia-php/pools/tree/0.4.2" + }, + "time": "2022-11-22T07:55:45+00:00" + }, + { + "name": "utopia-php/preloader", + "version": "0.2.4", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/preloader.git", + "reference": "65ef48392e72172f584b0baa2e224f9a1cebcce0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/preloader/zipball/65ef48392e72172f584b0baa2e224f9a1cebcce0", + "reference": "65ef48392e72172f584b0baa2e224f9a1cebcce0", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Preloader\\": "src/Preloader" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "team@appwrite.io" + } + ], + "description": "Utopia Preloader library is simple and lite library for managing PHP preloading configuration", + "keywords": [ + "framework", + "php", + "preload", + "preloader", + "preloading", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/preloader/issues", + "source": "https://github.com/utopia-php/preloader/tree/0.2.4" + }, + "time": "2020-10-24T07:04:59+00:00" + }, + { + "name": "utopia-php/queue", + "version": "0.5.1", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/queue.git", + "reference": "4b39e1f232b2e619b0d7fb4004f2356df334ddc1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/queue/zipball/4b39e1f232b2e619b0d7fb4004f2356df334ddc1", + "reference": "4b39e1f232b2e619b0d7fb4004f2356df334ddc1", + "shasum": "" + }, + "require": { + "php": ">=8.0", + "utopia-php/cli": "0.14.*", + "utopia-php/framework": "0.*.*" + }, + "require-dev": { + "laravel/pint": "^0.2.3", + "phpstan/phpstan": "^1.8", + "phpunit/phpunit": "^9.5.5", + "swoole/ide-helper": "4.8.8", + "workerman/workerman": "^4.0" + }, + "suggest": { + "ext-swoole": "Needed to support Swoole.", + "workerman/workerman": "Needed to support Workerman." + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Queue\\": "src/Queue" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Torsten Dittmann", + "email": "torsten@appwrite.io" + } + ], + "description": "A powerful task queue.", + "keywords": [ + "Tasks", + "framework", + "php", + "queue", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/queue/issues", + "source": "https://github.com/utopia-php/queue/tree/0.5.1" + }, + "time": "2022-11-16T19:47:26+00:00" + }, + { + "name": "utopia-php/registry", + "version": "0.5.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/registry.git", + "reference": "bedc4ed54527b2803e6dfdccc39449f98522b70d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/registry/zipball/bedc4ed54527b2803e6dfdccc39449f98522b70d", + "reference": "bedc4ed54527b2803e6dfdccc39449f98522b70d", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Registry\\": "src/Registry" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple dependency management library for PHP", + "keywords": [ + "dependency management", + "di", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/registry/issues", + "source": "https://github.com/utopia-php/registry/tree/0.5.0" + }, + "time": "2021-03-10T10:45:22+00:00" + }, + { + "name": "utopia-php/storage", + "version": "0.13.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/storage.git", + "reference": "f34c010e4f8394a6b4aff70b6de55041d9a145d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/storage/zipball/f34c010e4f8394a6b4aff70b6de55041d9a145d3", + "reference": "f34c010e4f8394a6b4aff70b6de55041d9a145d3", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "ext-zlib": "*", + "ext-zstd": "*", + "php": ">=8.0", + "utopia-php/framework": "0.*.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Storage\\": "src/Storage" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple Storage library to manage application storage", + "keywords": [ + "framework", + "php", + "storage", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/storage/issues", + "source": "https://github.com/utopia-php/storage/tree/0.13.0" + }, + "time": "2022-11-17T15:10:18+00:00" + }, + { + "name": "utopia-php/swoole", + "version": "0.5.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/swoole.git", + "reference": "c2a3a4f944a2f22945af3cbcb95b13f0769628b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/swoole/zipball/c2a3a4f944a2f22945af3cbcb95b13f0769628b1", + "reference": "c2a3a4f944a2f22945af3cbcb95b13f0769628b1", + "shasum": "" + }, + "require": { + "ext-swoole": "*", + "php": ">=8.0", + "utopia-php/framework": "0.*.*" + }, + "require-dev": { + "laravel/pint": "1.2.*", + "phpunit/phpunit": "^9.3", + "swoole/ide-helper": "4.8.3", + "vimeo/psalm": "4.15.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Swoole\\": "src/Swoole" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "An extension for Utopia Framework to work with PHP Swoole as a PHP FPM alternative", + "keywords": [ + "framework", + "http", + "php", + "server", + "swoole", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/swoole/issues", + "source": "https://github.com/utopia-php/swoole/tree/0.5.0" + }, + "time": "2022-10-19T22:19:07+00:00" + }, + { + "name": "utopia-php/system", + "version": "0.6.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/system.git", + "reference": "289c4327713deadc9c748b5317d248133a02f245" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/system/zipball/289c4327713deadc9c748b5317d248133a02f245", + "reference": "289c4327713deadc9c748b5317d248133a02f245", + "shasum": "" + }, + "require": { + "laravel/pint": "1.2.*", + "php": ">=7.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "squizlabs/php_codesniffer": "^3.6", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\System\\": "src/System" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Torsten Dittmann", + "email": "torsten@appwrite.io" + } + ], + "description": "A simple library for obtaining information about the host's system.", + "keywords": [ + "framework", + "php", + "system", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/system/issues", + "source": "https://github.com/utopia-php/system/tree/0.6.0" + }, + "time": "2022-11-07T13:51:59+00:00" + }, + { + "name": "utopia-php/websocket", + "version": "0.1.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/websocket.git", + "reference": "51fcb86171400d8aa40d76c54593481fd273dab5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/websocket/zipball/51fcb86171400d8aa40d76c54593481fd273dab5", + "reference": "51fcb86171400d8aa40d76c54593481fd273dab5", + "shasum": "" + }, + "require": { + "php": ">=8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5.5", + "swoole/ide-helper": "4.6.6", + "textalk/websocket": "1.5.2", + "vimeo/psalm": "^4.8.1", + "workerman/workerman": "^4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\WebSocket\\": "src/WebSocket" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Torsten Dittmann", + "email": "torsten@appwrite.io" + } + ], + "description": "A simple abstraction for WebSocket servers.", + "keywords": [ + "framework", + "php", + "upf", + "utopia", + "websocket" + ], + "support": { + "issues": "https://github.com/utopia-php/websocket/issues", + "source": "https://github.com/utopia-php/websocket/tree/0.1.0" + }, + "time": "2021-12-20T10:50:09+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" + } + ], + "packages-dev": [ + { + "name": "appwrite/sdk-generator", + "version": "0.28.1", + "source": { + "type": "git", + "url": "https://github.com/appwrite/sdk-generator.git", + "reference": "ed8d3daa66589733b49b11c053d524cdf576ffee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ed8d3daa66589733b49b11c053d524cdf576ffee", + "reference": "ed8d3daa66589733b49b11c053d524cdf576ffee", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "matthiasmullie/minify": "^1.3.68", + "php": ">=7.0.0", + "twig/twig": "^3.4.1" + }, + "require-dev": { + "brianium/paratest": "^6.4", + "phpunit/phpunit": "^9.5.21" + }, + "type": "library", + "autoload": { + "psr-4": { + "Appwrite\\SDK\\": "src/SDK", + "Appwrite\\Spec\\": "src/Spec" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "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.28.1" + }, + "time": "2022-09-22T09:15:54+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:15:36+00:00" + }, + { + "name": "matthiasmullie/minify", + "version": "1.3.70", + "source": { + "type": "git", + "url": "https://github.com/matthiasmullie/minify.git", + "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/2807d9f9bece6877577ad44acb5c801bb3ae536b", + "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "matthiasmullie/path-converter": "~1.1", + "php": ">=5.3.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": ">=2.0", + "matthiasmullie/scrapbook": ">=1.3", + "phpunit/phpunit": ">=4.8", + "squizlabs/php_codesniffer": ">=3.0" + }, + "suggest": { + "psr/cache-implementation": "Cache implementation to use with Minify::cache" + }, + "bin": [ + "bin/minifycss", + "bin/minifyjs" + ], + "type": "library", + "autoload": { + "psr-4": { + "MatthiasMullie\\Minify\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthias Mullie", + "email": "minify@mullie.eu", + "homepage": "https://www.mullie.eu", + "role": "Developer" + } + ], + "description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.", + "homepage": "https://github.com/matthiasmullie/minify", + "keywords": [ + "JS", + "css", + "javascript", + "minifier", + "minify" + ], + "support": { + "issues": "https://github.com/matthiasmullie/minify/issues", + "source": "https://github.com/matthiasmullie/minify/tree/1.3.70" + }, + "funding": [ + { + "url": "https://github.com/matthiasmullie", + "type": "github" + } + ], + "time": "2022-12-09T12:56:44+00:00" + }, + { + "name": "matthiasmullie/path-converter", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/matthiasmullie/path-converter.git", + "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/matthiasmullie/path-converter/zipball/e7d13b2c7e2f2268e1424aaed02085518afa02d9", + "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "MatthiasMullie\\PathConverter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthias Mullie", + "email": "pathconverter@mullie.eu", + "homepage": "http://www.mullie.eu", + "role": "Developer" + } + ], + "description": "Relative path converter", + "homepage": "http://github.com/matthiasmullie/path-converter", + "keywords": [ + "converter", + "path", + "paths", + "relative" + ], + "support": { + "issues": "https://github.com/matthiasmullie/path-converter/issues", + "source": "https://github.com/matthiasmullie/path-converter/tree/1.1.3" + }, + "time": "2019-02-05T23:41:09+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2022-03-03T13:19:32+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.15.3", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039", + "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3" + }, + "time": "2023-01-16T22:05:37+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + }, + "time": "2021-10-19T17:43:47+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.6.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "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.2" + }, + "time": "2022-10-14T12:47:21+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.16.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be8cac52a0827776ff9ccda8c381ac5b71aeb359", + "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0 || ^7.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/v1.16.0" + }, + "time": "2022-11-29T15:06:56+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.24", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed", + "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.14", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "*", + "ext-xdebug": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-01-26T08:26:55+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.5.20", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba", + "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^3.0", + "sebastian/version": "^3.0.2" + }, + "require-dev": { + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.5-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-04-01T12:37:26+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:41:17+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-04-03T09:37:03+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T06:03:37+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-02-14T08:28:10+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-12T14:47:03+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.7.1", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2022-06-18T07:21:10+00:00" + }, + { + "name": "swoole/ide-helper", + "version": "4.8.9", + "source": { + "type": "git", + "url": "https://github.com/swoole/ide-helper.git", + "reference": "8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swoole/ide-helper/zipball/8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe", + "reference": "8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe", + "shasum": "" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Team Swoole", + "email": "team@swoole.com" + } + ], + "description": "IDE help files for Swoole.", + "support": { + "issues": "https://github.com/swoole/ide-helper/issues", + "source": "https://github.com/swoole/ide-helper/tree/4.8.9" + }, + "funding": [ + { + "url": "https://gitee.com/swoole/swoole?donate=true", + "type": "custom" + }, + { + "url": "https://github.com/swoole", + "type": "github" + } + ], + "time": "2022-04-18T20:38:04+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "textalk/websocket", + "version": "1.5.7", + "source": { + "type": "git", + "url": "https://github.com/Textalk/websocket-php.git", + "reference": "1712325e99b6bf869ccbf9bf41ab749e7328ea46" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Textalk/websocket-php/zipball/1712325e99b6bf869ccbf9bf41ab749e7328ea46", + "reference": "1712325e99b6bf869ccbf9bf41ab749e7328ea46", + "shasum": "" + }, + "require": { + "php": "^7.2 | ^8.0", + "psr/log": "^1 | ^2 | ^3" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.0", + "phpunit/phpunit": "^8.0|^9.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "WebSocket\\": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Fredrik Liljegren" + }, + { + "name": "Sören Jensen", + "email": "soren@abicart.se" + } + ], + "description": "WebSocket client and server", + "support": { + "issues": "https://github.com/Textalk/websocket-php/issues", + "source": "https://github.com/Textalk/websocket-php/tree/1.5.7" + }, + "time": "2022-03-29T09:46:59+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + }, + { + "name": "twig/twig", + "version": "v3.5.0", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/3ffcf4b7d890770466da3b2666f82ac054e7ec72", + "reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-mbstring": "^1.3" + }, + "require-dev": { + "psr/container": "^1.0", + "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.5-dev" + } + }, + "autoload": { + "psr-4": { + "Twig\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Twig Team", + "role": "Contributors" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "https://twig.symfony.com", + "keywords": [ + "templating" + ], + "support": { + "issues": "https://github.com/twigphp/Twig/issues", + "source": "https://github.com/twigphp/Twig/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2022-12-27T12:28:18+00:00" + } + ], + "aliases": [ + { + "package": "utopia-php/database", + "version": "dev-increment", + "alias": "0.28.0", + "alias_normalized": "0.28.0.0" + } + ], + "minimum-stability": "stable", + "stability-flags": { + "utopia-php/database": 20 + }, + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=8.0.0", + "ext-curl": "*", + "ext-imagick": "*", + "ext-mbstring": "*", + "ext-json": "*", + "ext-yaml": "*", + "ext-dom": "*", + "ext-redis": "*", + "ext-swoole": "*", + "ext-pdo": "*", + "ext-openssl": "*", + "ext-zlib": "*", + "ext-sockets": "*" + }, + "platform-dev": { + "ext-fileinfo": "*" + }, + "platform-overrides": { + "php": "8.0" + }, + "plugin-api-version": "2.2.0" +} From 82f8fbdff80df99592917be56ee21aabcb1e6172 Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 1 Feb 2023 11:18:03 +0200 Subject: [PATCH 67/94] console --- app/console | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/console b/app/console index 5deba7618..d64fc2c3f 160000 --- a/app/console +++ b/app/console @@ -1 +1 @@ -Subproject commit 5deba7618ddcc1d5135fc84b5e66e63433a834c4 +Subproject commit d64fc2c3f981a6213cf28812364fcf92ac3f61af From 588d8454a2d2d2935ae156cddcbe352de7effb7a Mon Sep 17 00:00:00 2001 From: Shimon Newman Date: Thu, 2 Feb 2023 11:35:50 +0200 Subject: [PATCH 68/94] Update composer.json Co-authored-by: Christy Jacob --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index fbb26942c..77812ce9b 100644 --- a/composer.json +++ b/composer.json @@ -63,7 +63,7 @@ "utopia-php/logger": "0.3.*", "utopia-php/messaging": "0.1.*", "utopia-php/registry": "0.5.*", - "utopia-php/storage": "0.13.0", + "utopia-php/storage": "0.13.*", "utopia-php/swoole": "0.5.*", "utopia-php/websocket": "0.1.0", "resque/php-resque": "1.3.6", From abdd5f016ad59aabc0ff640763615eb2c2535b0f Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 2 Feb 2023 13:55:23 +0200 Subject: [PATCH 69/94] addressing comments --- app/console | 2 +- app/controllers/api/databases.php | 136 +- app/controllers/api/functions.php | 324 +- app/init.php | 2 + app/views/install/compose.phtml | 72 +- composer.lock | 5090 ---------------------- docker-compose.yml | 10 +- src/Appwrite/Platform/Services/Tasks.php | 1 - src/Appwrite/Platform/Tasks/Doctor.php | 25 + 9 files changed, 295 insertions(+), 5367 deletions(-) delete mode 100644 composer.lock diff --git a/app/console b/app/console index d64fc2c3f..fae048b91 160000 --- a/app/console +++ b/app/console @@ -1 +1 @@ -Subproject commit d64fc2c3f981a6213cf28812364fcf92ac3f61af +Subproject commit fae048b91787d0b372c13caf27f14fc8b780ef60 diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index d9312442a..b9628a53d 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -2385,6 +2385,74 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu $response->noContent(); }); +App::get('/v1/databases/usage') + ->desc('Get usage stats for the database') + ->groups(['api', 'database']) + ->label('scope', 'collections.read') + ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) + ->label('sdk.namespace', 'databases') + ->label('sdk.method', 'getUsage') + ->label('sdk.response.code', Response::STATUS_CODE_OK) + ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) + ->label('sdk.response.model', Response::MODEL_USAGE_DATABASES) + ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), '`Date range.', true) + ->inject('response') + ->inject('dbForProject') + ->action(function (string $range, Response $response, Database $dbForProject) { + + $periods = Config::getParam('usage', []); + $stats = $usage = []; + $days = $periods[$range]; + $metrics = [ + 'databases', + 'collections', + 'documents', + ]; + + Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $days['limit']; + $period = $days['period']; + $results = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + $stats[$metric] = []; + foreach ($results as $result) { + $stats[$metric][$result->getAttribute('time')] = [ + 'value' => $result->getAttribute('value'), + ]; + } + } + }); + + $format = match ($days['period']) { + '1h' => 'Y-m-d\TH:00:00.000P', + '1d' => 'Y-m-d\T00:00:00.000P', + }; + + foreach ($metrics as $metric) { + $usage[$metric] = []; + $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { + $leap += $days['factor']; + $formatDate = date($format, $leap); + $usage[$metric][] = [ + 'value' => $stats[$metric][$formatDate]['value'] ?? 0, + 'date' => $formatDate, + ]; + } + } + $response->dynamic(new Document([ + 'range' => $range, + 'databasesCount' => $usage[$metrics[0]], + 'collectionsCount' => $usage[$metrics[1]], + 'documentsCount' => $usage[$metrics[2]], + ]), Response::MODEL_USAGE_DATABASES); + }); + App::get('/v1/databases/:databaseId/usage') ->desc('Get usage stats for the database') ->groups(['api', 'database']) @@ -2535,71 +2603,3 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage') 'documentsCount' => $usage[$metrics[0]], ]), Response::MODEL_USAGE_COLLECTION); }); - -App::get('/v1/databases/usage') - ->desc('Get usage stats for the database') - ->groups(['api', 'database']) - ->label('scope', 'collections.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'databases') - ->label('sdk.method', 'getUsage') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USAGE_DATABASES) - ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), '`Date range.', true) - ->inject('response') - ->inject('dbForProject') - ->action(function (string $range, Response $response, Database $dbForProject) { - - $periods = Config::getParam('usage', []); - $stats = $usage = []; - $days = $periods[$range]; - $metrics = [ - 'databases', - 'collections', - 'documents', - ]; - - Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $days['limit']; - $period = $days['period']; - $results = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); - $stats[$metric] = []; - foreach ($results as $result) { - $stats[$metric][$result->getAttribute('time')] = [ - 'value' => $result->getAttribute('value'), - ]; - } - } - }); - - $format = match ($days['period']) { - '1h' => 'Y-m-d\TH:00:00.000P', - '1d' => 'Y-m-d\T00:00:00.000P', - }; - - foreach ($metrics as $metric) { - $usage[$metric] = []; - $leap = time() - ($days['limit'] * $days['factor']); - while ($leap < time()) { - $leap += $days['factor']; - $formatDate = date($format, $leap); - $usage[$metric][] = [ - 'value' => $stats[$metric][$formatDate]['value'] ?? 0, - 'date' => $formatDate, - ]; - } - } - $response->dynamic(new Document([ - 'range' => $range, - 'databasesCount' => $usage[$metrics[0]], - 'collectionsCount' => $usage[$metrics[1]], - 'documentsCount' => $usage[$metrics[2]], - ]), Response::MODEL_USAGE_DATABASES); - }); diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 2e734fbb6..2d77a12b7 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -210,6 +210,168 @@ App::get('/v1/functions/:functionId') $response->dynamic($function, Response::MODEL_FUNCTION); }); +App::get('/v1/functions/:functionId/usage') + ->desc('Get Function Usage') + ->groups(['api', 'functions']) + ->label('scope', 'functions.read') + ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) + ->label('sdk.namespace', 'functions') + ->label('sdk.method', 'getFunctionUsage') + ->label('sdk.response.code', Response::STATUS_CODE_OK) + ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) + ->label('sdk.response.model', Response::MODEL_USAGE_FUNCTIONS) + ->param('functionId', '', new UID(), 'Function ID.') + ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d']), 'Date range.', true) + ->inject('response') + ->inject('dbForProject') + ->action(function (string $functionId, string $range, Response $response, Database $dbForProject) { + + $function = $dbForProject->getDocument('functions', $functionId); + + if ($function->isEmpty()) { + throw new Exception(Exception::FUNCTION_NOT_FOUND); + } + + $periods = Config::getParam('usage', []); + $stats = $usage = []; + $days = $periods[$range]; + $metrics = [ + 'functions.' . $function->getInternalId() . '.deployments', + 'functions.' . $function->getInternalId() . '.deployments.storage', + $function->getInternalId() . '.builds', + $function->getInternalId() . '.builds.storage', + $function->getInternalId() . '.builds.compute', + $function->getInternalId() . '.executions', + $function->getInternalId() . '.executions.compute', + ]; + + Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $days['limit']; + $period = $days['period']; + $results = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + $stats[$metric] = []; + foreach ($results as $result) { + $stats[$metric][$result->getAttribute('time')] = [ + 'value' => $result->getAttribute('value'), + ]; + } + } + }); + + $format = match ($days['period']) { + '1h' => 'Y-m-d\TH:00:00.000P', + '1d' => 'Y-m-d\T00:00:00.000P', + }; + + foreach ($metrics as $metric) { + $usage[$metric] = []; + $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { + $leap += $days['factor']; + $formatDate = date($format, $leap); + $usage[$metric][] = [ + 'value' => $stats[$metric][$formatDate]['value'] ?? 0, + 'date' => $formatDate, + ]; + } + } + + $response->dynamic(new Document([ + 'range' => $range, + 'deployments' => $usage[$metrics[0]], + 'deploymentsStorage' => $usage[$metrics[1]], + 'builds' => $usage[$metrics[2]], + 'buildsStorage' => $usage[$metrics[3]], + 'buildsCompute' => $usage[$metrics[4]], + 'executions' => $usage[$metrics[5]], + 'executionsCompute' => $usage[$metrics[6]], + ]), Response::MODEL_USAGE_FUNCTION); + }); + +App::get('/v1/functions/usage') + ->desc('Get Functions Usage') + ->groups(['api', 'functions']) + ->label('scope', 'functions.read') + ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) + ->label('sdk.namespace', 'functions') + ->label('sdk.method', 'getUsage') + ->label('sdk.response.code', Response::STATUS_CODE_OK) + ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) + ->label('sdk.response.model', Response::MODEL_USAGE_FUNCTIONS) + ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d']), 'Date range.', true) + ->inject('response') + ->inject('dbForProject') + ->action(function (string $range, Response $response, Database $dbForProject) { + + $periods = Config::getParam('usage', []); + $stats = $usage = []; + $days = $periods[$range]; + $metrics = [ + 'functions', + 'deployments', + 'deployments.storage', + 'builds', + 'builds.storage', + 'builds.compute', + 'executions', + 'executions.compute', + ]; + + Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $days['limit']; + $period = $days['period']; + $results = $dbForProject->find('stats', [ + Query::equal('period', [$period]), + Query::equal('metric', [$metric]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + $stats[$metric] = []; + foreach ($results as $result) { + $stats[$metric][$result->getAttribute('time')] = [ + 'value' => $result->getAttribute('value'), + ]; + } + } + }); + + $format = match ($days['period']) { + '1h' => 'Y-m-d\TH:00:00.000P', + '1d' => 'Y-m-d\T00:00:00.000P', + }; + + foreach ($metrics as $metric) { + $usage[$metric] = []; + $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { + $leap += $days['factor']; + $formatDate = date($format, $leap); + $usage[$metric][] = [ + 'value' => $stats[$metric][$formatDate]['value'] ?? 0, + 'date' => $formatDate, + ]; + } + } + $response->dynamic(new Document([ + 'range' => $range, + 'functions' => $usage[$metrics[0]], + 'deployments' => $usage[$metrics[1]], + 'deploymentsStorage' => $usage[$metrics[2]], + 'builds' => $usage[$metrics[3]], + 'buildsStorage' => $usage[$metrics[4]], + 'buildsCompute' => $usage[$metrics[5]], + 'executions' => $usage[$metrics[6]], + 'executionsCompute' => $usage[$metrics[7]], + ]), Response::MODEL_USAGE_FUNCTIONS); + }); + App::put('/v1/functions/:functionId') ->groups(['api', 'functions']) ->desc('Update Function') @@ -1362,165 +1524,3 @@ App::delete('/v1/functions/:functionId/variables/:variableId') $response->noContent(); }); - -App::get('/v1/functions/:functionId/usage') - ->desc('Get Function Usage') - ->groups(['api', 'functions']) - ->label('scope', 'functions.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'getFunctionUsage') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USAGE_FUNCTIONS) - ->param('functionId', '', new UID(), 'Function ID.') - ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d']), 'Date range.', true) - ->inject('response') - ->inject('dbForProject') - ->action(function (string $functionId, string $range, Response $response, Database $dbForProject) { - - $function = $dbForProject->getDocument('functions', $functionId); - - if ($function->isEmpty()) { - throw new Exception(Exception::FUNCTION_NOT_FOUND); - } - - $periods = Config::getParam('usage', []); - $stats = $usage = []; - $days = $periods[$range]; - $metrics = [ - 'functions.' . $function->getInternalId() . '.deployments', - 'functions.' . $function->getInternalId() . '.deployments.storage', - $function->getInternalId() . '.builds', - $function->getInternalId() . '.builds.storage', - $function->getInternalId() . '.builds.compute', - $function->getInternalId() . '.executions', - $function->getInternalId() . '.executions.compute', - ]; - - Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $days['limit']; - $period = $days['period']; - $results = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); - $stats[$metric] = []; - foreach ($results as $result) { - $stats[$metric][$result->getAttribute('time')] = [ - 'value' => $result->getAttribute('value'), - ]; - } - } - }); - - $format = match ($days['period']) { - '1h' => 'Y-m-d\TH:00:00.000P', - '1d' => 'Y-m-d\T00:00:00.000P', - }; - - foreach ($metrics as $metric) { - $usage[$metric] = []; - $leap = time() - ($days['limit'] * $days['factor']); - while ($leap < time()) { - $leap += $days['factor']; - $formatDate = date($format, $leap); - $usage[$metric][] = [ - 'value' => $stats[$metric][$formatDate]['value'] ?? 0, - 'date' => $formatDate, - ]; - } - } - - $response->dynamic(new Document([ - 'range' => $range, - 'deployments' => $usage[$metrics[0]], - 'deploymentsStorage' => $usage[$metrics[1]], - 'builds' => $usage[$metrics[2]], - 'buildsStorage' => $usage[$metrics[3]], - 'buildsCompute' => $usage[$metrics[4]], - 'executions' => $usage[$metrics[5]], - 'executionsCompute' => $usage[$metrics[6]], - ]), Response::MODEL_USAGE_FUNCTION); - }); - -App::get('/v1/functions/usage') - ->desc('Get Functions Usage') - ->groups(['api', 'functions']) - ->label('scope', 'functions.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'functions') - ->label('sdk.method', 'getUsage') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USAGE_FUNCTIONS) - ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d']), 'Date range.', true) - ->inject('response') - ->inject('dbForProject') - ->action(function (string $range, Response $response, Database $dbForProject) { - - $periods = Config::getParam('usage', []); - $stats = $usage = []; - $days = $periods[$range]; - $metrics = [ - 'functions', - 'deployments', - 'deployments.storage', - 'builds', - 'builds.storage', - 'builds.compute', - 'executions', - 'executions.compute', - ]; - - Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $days['limit']; - $period = $days['period']; - $results = $dbForProject->find('stats', [ - Query::equal('period', [$period]), - Query::equal('metric', [$metric]), - Query::limit($limit), - Query::orderDesc('time'), - ]); - $stats[$metric] = []; - foreach ($results as $result) { - $stats[$metric][$result->getAttribute('time')] = [ - 'value' => $result->getAttribute('value'), - ]; - } - } - }); - - $format = match ($days['period']) { - '1h' => 'Y-m-d\TH:00:00.000P', - '1d' => 'Y-m-d\T00:00:00.000P', - }; - - foreach ($metrics as $metric) { - $usage[$metric] = []; - $leap = time() - ($days['limit'] * $days['factor']); - while ($leap < time()) { - $leap += $days['factor']; - $formatDate = date($format, $leap); - $usage[$metric][] = [ - 'value' => $stats[$metric][$formatDate]['value'] ?? 0, - 'date' => $formatDate, - ]; - } - } - $response->dynamic(new Document([ - 'range' => $range, - 'functions' => $usage[$metrics[0]], - 'deployments' => $usage[$metrics[1]], - 'deploymentsStorage' => $usage[$metrics[2]], - 'builds' => $usage[$metrics[3]], - 'buildsStorage' => $usage[$metrics[4]], - 'buildsCompute' => $usage[$metrics[5]], - 'executions' => $usage[$metrics[6]], - 'executionsCompute' => $usage[$metrics[7]], - ]), Response::MODEL_USAGE_FUNCTIONS); - }); diff --git a/app/init.php b/app/init.php index 1728fb2b8..3ec27d00e 100644 --- a/app/init.php +++ b/app/init.php @@ -175,6 +175,8 @@ const APP_AUTH_TYPE_ADMIN = 'Admin'; // Response related const MAX_OUTPUT_CHUNK_SIZE = 2 * 1024 * 1024; // 2MB + + $register = new Registry(); App::setMode(App::getEnv('_APP_ENV', App::MODE_TYPE_PRODUCTION)); diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index bff03a2b6..f38f4c45f 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -430,42 +430,6 @@ services: - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG - appwrite-worker-usage: - image: /: - entrypoint: worker-usage - <<: *x-logging - container_name: appwrite-worker-usage - networks: - - appwrite - volumes: - - ./app:/usr/src/code/app - - ./src:/usr/src/code/src - depends_on: - - redis - - mariadb - environment: - - _APP_ENV - - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - - _APP_OPENSSL_KEY_V1 - - _APP_DB_HOST - - _APP_DB_PORT - - _APP_DB_SCHEMA - - _APP_DB_USER - - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - - _APP_USAGE_STATS - - DOCKERHUB_PULL_USERNAME - - DOCKERHUB_PULL_PASSWORD - appwrite-maintenance: image: /: entrypoint: maintenance @@ -581,6 +545,42 @@ services: # volumes: # - appwrite-uploads:/storage/uploads + appwrite-worker-usage: + image: /: + entrypoint: worker-usage + <<: *x-logging + container_name: appwrite-worker-usage + networks: + - appwrite + volumes: + - ./app:/usr/src/code/app + - ./src:/usr/src/code/src + depends_on: + - redis + - mariadb + environment: + - _APP_ENV + - _APP_WORKER_PER_CORE + - _APP_CONNECTIONS_MAX + - _APP_POOL_CLIENTS + - _APP_OPENSSL_KEY_V1 + - _APP_DB_HOST + - _APP_DB_PORT + - _APP_DB_SCHEMA + - _APP_DB_USER + - _APP_DB_PASS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS + - _APP_CONNECTIONS_DB_CONSOLE + - _APP_CONNECTIONS_DB_PROJECT + - _APP_CONNECTIONS_CACHE + - _APP_CONNECTIONS_QUEUE + - _APP_USAGE_STATS + - DOCKERHUB_PULL_USERNAME + - DOCKERHUB_PULL_PASSWORD + networks: gateway: name: gateway diff --git a/composer.lock b/composer.lock deleted file mode 100644 index a1d6075d7..000000000 --- a/composer.lock +++ /dev/null @@ -1,5090 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "36ef20efb91c04f1985f7dbaf52450f5", - "packages": [ - { - "name": "adhocore/jwt", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/adhocore/php-jwt.git", - "reference": "6c434af7170090bb7a8880d2bc220a2254ba7899" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/adhocore/php-jwt/zipball/6c434af7170090bb7a8880d2bc220a2254ba7899", - "reference": "6c434af7170090bb7a8880d2bc220a2254ba7899", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.5 || ^7.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Ahc\\Jwt\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jitendra Adhikari", - "email": "jiten.adhikary@gmail.com" - } - ], - "description": "Ultra lightweight JSON web token (JWT) library for PHP5.5+.", - "keywords": [ - "auth", - "json-web-token", - "jwt", - "jwt-auth", - "jwt-php", - "token" - ], - "support": { - "issues": "https://github.com/adhocore/php-jwt/issues", - "source": "https://github.com/adhocore/php-jwt/tree/1.1.2" - }, - "funding": [ - { - "url": "https://paypal.me/ji10", - "type": "custom" - } - ], - "time": "2021-02-20T09:56:44+00:00" - }, - { - "name": "appwrite/php-clamav", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/appwrite/php-clamav.git", - "reference": "61d00f24f9e7766fbba233e7b8d09c5475388073" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/appwrite/php-clamav/zipball/61d00f24f9e7766fbba233e7b8d09c5475388073", - "reference": "61d00f24f9e7766fbba233e7b8d09c5475388073", - "shasum": "" - }, - "require": { - "ext-sockets": "*", - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Appwrite\\ClamAV\\": "src/ClamAV" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "ClamAV network and pipe client for PHP", - "keywords": [ - "anti virus", - "appwrite", - "clamav", - "php" - ], - "support": { - "issues": "https://github.com/appwrite/php-clamav/issues", - "source": "https://github.com/appwrite/php-clamav/tree/1.1.0" - }, - "time": "2020-10-02T05:23:46+00:00" - }, - { - "name": "appwrite/php-runtimes", - "version": "0.11.1", - "source": { - "type": "git", - "url": "https://github.com/appwrite/runtimes.git", - "reference": "9d74a477ba3333cbcfac565c46fcf19606b7b603" - }, - "require": { - "php": ">=8.0", - "utopia-php/system": "0.6.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Appwrite\\Runtimes\\": "src/Runtimes" - } - }, - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Torsten Dittmann", - "email": "torsten@appwrite.io" - } - ], - "description": "Appwrite repository for Cloud Function runtimes that contains the configurations and tests for all of the Appwrite runtime environments.", - "keywords": [ - "appwrite", - "php", - "runtimes" - ], - "time": "2022-11-07T16:45:52+00:00" - }, - { - "name": "chillerlan/php-qrcode", - "version": "4.3.3", - "source": { - "type": "git", - "url": "https://github.com/chillerlan/php-qrcode.git", - "reference": "6356b246948ac1025882b3f55e7c68ebd4515ae3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/6356b246948ac1025882b3f55e7c68ebd4515ae3", - "reference": "6356b246948ac1025882b3f55e7c68ebd4515ae3", - "shasum": "" - }, - "require": { - "chillerlan/php-settings-container": "^2.1", - "ext-mbstring": "*", - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "phan/phan": "^5.3", - "phpunit/phpunit": "^9.5", - "setasign/fpdf": "^1.8.2" - }, - "suggest": { - "chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.", - "setasign/fpdf": "Required to use the QR FPDF output." - }, - "type": "library", - "autoload": { - "psr-4": { - "chillerlan\\QRCode\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kazuhiko Arase", - "homepage": "https://github.com/kazuhikoarase" - }, - { - "name": "Smiley", - "email": "smiley@chillerlan.net", - "homepage": "https://github.com/codemasher" - }, - { - "name": "Contributors", - "homepage": "https://github.com/chillerlan/php-qrcode/graphs/contributors" - } - ], - "description": "A QR code generator. PHP 7.4+", - "homepage": "https://github.com/chillerlan/php-qrcode", - "keywords": [ - "phpqrcode", - "qr", - "qr code", - "qrcode", - "qrcode-generator" - ], - "support": { - "issues": "https://github.com/chillerlan/php-qrcode/issues", - "source": "https://github.com/chillerlan/php-qrcode/tree/4.3.3" - }, - "funding": [ - { - "url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", - "type": "custom" - }, - { - "url": "https://ko-fi.com/codemasher", - "type": "ko_fi" - } - ], - "time": "2021-11-25T22:38:09+00:00" - }, - { - "name": "chillerlan/php-settings-container", - "version": "2.1.4", - "source": { - "type": "git", - "url": "https://github.com/chillerlan/php-settings-container.git", - "reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/1beb7df3c14346d4344b0b2e12f6f9a74feabd4a", - "reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "phan/phan": "^5.3", - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "chillerlan\\Settings\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Smiley", - "email": "smiley@chillerlan.net", - "homepage": "https://github.com/codemasher" - } - ], - "description": "A container class for immutable settings objects. Not a DI container. PHP 7.4+", - "homepage": "https://github.com/chillerlan/php-settings-container", - "keywords": [ - "PHP7", - "Settings", - "configuration", - "container", - "helper" - ], - "support": { - "issues": "https://github.com/chillerlan/php-settings-container/issues", - "source": "https://github.com/chillerlan/php-settings-container" - }, - "funding": [ - { - "url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", - "type": "custom" - }, - { - "url": "https://ko-fi.com/codemasher", - "type": "ko_fi" - } - ], - "time": "2022-07-05T22:32:14+00:00" - }, - { - "name": "colinmollenhour/credis", - "version": "v1.14.0", - "source": { - "type": "git", - "url": "https://github.com/colinmollenhour/credis.git", - "reference": "dccc8a46586475075fbb012d8bd523b8a938c2dc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/dccc8a46586475075fbb012d8bd523b8a938c2dc", - "reference": "dccc8a46586475075fbb012d8bd523b8a938c2dc", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "suggest": { - "ext-redis": "Improved performance for communicating with redis" - }, - "type": "library", - "autoload": { - "classmap": [ - "Client.php", - "Cluster.php", - "Sentinel.php", - "Module.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Colin Mollenhour", - "email": "colin@mollenhour.com" - } - ], - "description": "Credis is a lightweight interface to the Redis key-value store which wraps the phpredis library when available for better performance.", - "homepage": "https://github.com/colinmollenhour/credis", - "support": { - "issues": "https://github.com/colinmollenhour/credis/issues", - "source": "https://github.com/colinmollenhour/credis/tree/v1.14.0" - }, - "time": "2022-11-09T01:18:39+00:00" - }, - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.5", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" - }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-01-17T14:14:24+00:00" - }, - { - "name": "dragonmantank/cron-expression", - "version": "v3.3.1", - "source": { - "type": "git", - "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/be85b3f05b46c39bbc0d95f6c071ddff669510fa", - "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa", - "shasum": "" - }, - "require": { - "php": "^7.2|^8.0", - "webmozart/assert": "^1.0" - }, - "replace": { - "mtdowling/cron-expression": "^1.0" - }, - "require-dev": { - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-webmozart-assert": "^1.0", - "phpunit/phpunit": "^7.0|^8.0|^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Cron\\": "src/Cron/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Tankersley", - "email": "chris@ctankersley.com", - "homepage": "https://github.com/dragonmantank" - } - ], - "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", - "keywords": [ - "cron", - "schedule" - ], - "support": { - "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.1" - }, - "funding": [ - { - "url": "https://github.com/dragonmantank", - "type": "github" - } - ], - "time": "2022-01-18T15:43:28+00:00" - }, - { - "name": "jean85/pretty-package-versions", - "version": "1.6.0", - "source": { - "type": "git", - "url": "https://github.com/Jean85/pretty-package-versions.git", - "reference": "1e0104b46f045868f11942aea058cd7186d6c303" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/1e0104b46f045868f11942aea058cd7186d6c303", - "reference": "1e0104b46f045868f11942aea058cd7186d6c303", - "shasum": "" - }, - "require": { - "composer/package-versions-deprecated": "^1.8.0", - "php": "^7.0|^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0|^8.5|^9.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Jean85\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Alessandro Lai", - "email": "alessandro.lai85@gmail.com" - } - ], - "description": "A wrapper for ocramius/package-versions to get pretty versions strings", - "keywords": [ - "composer", - "package", - "release", - "versions" - ], - "support": { - "issues": "https://github.com/Jean85/pretty-package-versions/issues", - "source": "https://github.com/Jean85/pretty-package-versions/tree/1.6.0" - }, - "time": "2021-02-04T16:20:16+00:00" - }, - { - "name": "laravel/pint", - "version": "v1.2.1", - "source": { - "type": "git", - "url": "https://github.com/laravel/pint.git", - "reference": "e60e2112ee779ce60f253695b273d1646a17d6f1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/e60e2112ee779ce60f253695b273d1646a17d6f1", - "reference": "e60e2112ee779ce60f253695b273d1646a17d6f1", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-mbstring": "*", - "ext-tokenizer": "*", - "ext-xml": "*", - "php": "^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.11.0", - "illuminate/view": "^9.32.0", - "laravel-zero/framework": "^9.2.0", - "mockery/mockery": "^1.5.1", - "nunomaduro/larastan": "^2.2.0", - "nunomaduro/termwind": "^1.14.0", - "pestphp/pest": "^1.22.1" - }, - "bin": [ - "builds/pint" - ], - "type": "project", - "autoload": { - "psr-4": { - "App\\": "app/", - "Database\\Seeders\\": "database/seeders/", - "Database\\Factories\\": "database/factories/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nuno Maduro", - "email": "enunomaduro@gmail.com" - } - ], - "description": "An opinionated code formatter for PHP.", - "homepage": "https://laravel.com", - "keywords": [ - "format", - "formatter", - "lint", - "linter", - "php" - ], - "support": { - "issues": "https://github.com/laravel/pint/issues", - "source": "https://github.com/laravel/pint" - }, - "time": "2022-11-29T16:25:20+00:00" - }, - { - "name": "matomo/device-detector", - "version": "6.0.0", - "source": { - "type": "git", - "url": "https://github.com/matomo-org/device-detector.git", - "reference": "7fc2af3af62bd69e6e3404d561e371a83c112be9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/matomo-org/device-detector/zipball/7fc2af3af62bd69e6e3404d561e371a83c112be9", - "reference": "7fc2af3af62bd69e6e3404d561e371a83c112be9", - "shasum": "" - }, - "require": { - "mustangostang/spyc": "*", - "php": "^7.2|^8.0" - }, - "replace": { - "piwik/device-detector": "self.version" - }, - "require-dev": { - "matthiasmullie/scrapbook": "^1.4.7", - "mayflower/mo4-coding-standard": "^v8.0.0", - "phpstan/phpstan": "^0.12.52", - "phpunit/phpunit": "^8.5.8", - "psr/cache": "^1.0.1", - "psr/simple-cache": "^1.0.1", - "symfony/yaml": "^5.1.7" - }, - "suggest": { - "doctrine/cache": "Can directly be used for caching purpose", - "ext-yaml": "Necessary for using the Pecl YAML parser" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeviceDetector\\": "" - }, - "exclude-from-classmap": [ - "Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "The Matomo Team", - "email": "hello@matomo.org", - "homepage": "https://matomo.org/team/" - } - ], - "description": "The Universal Device Detection library, that parses User Agents and detects devices (desktop, tablet, mobile, tv, cars, console, etc.), clients (browsers, media players, mobile apps, feed readers, libraries, etc), operating systems, devices, brands and models.", - "homepage": "https://matomo.org", - "keywords": [ - "devicedetection", - "parser", - "useragent" - ], - "support": { - "forum": "https://forum.matomo.org/", - "issues": "https://github.com/matomo-org/device-detector/issues", - "source": "https://github.com/matomo-org/matomo", - "wiki": "https://dev.matomo.org/" - }, - "time": "2022-04-11T09:58:17+00:00" - }, - { - "name": "mongodb/mongodb", - "version": "1.8.0", - "source": { - "type": "git", - "url": "https://github.com/mongodb/mongo-php-library.git", - "reference": "953dbc19443aa9314c44b7217a16873347e6840d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/953dbc19443aa9314c44b7217a16873347e6840d", - "reference": "953dbc19443aa9314c44b7217a16873347e6840d", - "shasum": "" - }, - "require": { - "ext-hash": "*", - "ext-json": "*", - "ext-mongodb": "^1.8.1", - "jean85/pretty-package-versions": "^1.2", - "php": "^7.0 || ^8.0", - "symfony/polyfill-php80": "^1.19" - }, - "require-dev": { - "squizlabs/php_codesniffer": "^3.5, <3.5.5", - "symfony/phpunit-bridge": "5.x-dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8.x-dev" - } - }, - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "MongoDB\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Andreas Braun", - "email": "andreas.braun@mongodb.com" - }, - { - "name": "Jeremy Mikola", - "email": "jmikola@gmail.com" - } - ], - "description": "MongoDB driver library", - "homepage": "https://jira.mongodb.org/browse/PHPLIB", - "keywords": [ - "database", - "driver", - "mongodb", - "persistence" - ], - "support": { - "issues": "https://github.com/mongodb/mongo-php-library/issues", - "source": "https://github.com/mongodb/mongo-php-library/tree/1.8.0" - }, - "time": "2020-11-25T12:26:02+00:00" - }, - { - "name": "mustangostang/spyc", - "version": "0.6.3", - "source": { - "type": "git", - "url": "git@github.com:mustangostang/spyc.git", - "reference": "4627c838b16550b666d15aeae1e5289dd5b77da0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mustangostang/spyc/zipball/4627c838b16550b666d15aeae1e5289dd5b77da0", - "reference": "4627c838b16550b666d15aeae1e5289dd5b77da0", - "shasum": "" - }, - "require": { - "php": ">=5.3.1" - }, - "require-dev": { - "phpunit/phpunit": "4.3.*@dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.5.x-dev" - } - }, - "autoload": { - "files": [ - "Spyc.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "mustangostang", - "email": "vlad.andersen@gmail.com" - } - ], - "description": "A simple YAML loader/dumper class for PHP", - "homepage": "https://github.com/mustangostang/spyc/", - "keywords": [ - "spyc", - "yaml", - "yml" - ], - "time": "2019-09-10T13:16:29+00:00" - }, - { - "name": "phpmailer/phpmailer", - "version": "v6.6.0", - "source": { - "type": "git", - "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e43bac82edc26ca04b36143a48bde1c051cfd5b1", - "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-filter": "*", - "ext-hash": "*", - "php": ">=5.5.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "doctrine/annotations": "^1.2", - "php-parallel-lint/php-console-highlighter": "^0.5.0", - "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpcompatibility/php-compatibility": "^9.3.5", - "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.6.2", - "yoast/phpunit-polyfills": "^1.0.0" - }, - "suggest": { - "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", - "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", - "league/oauth2-google": "Needed for Google XOAUTH2 authentication", - "psr/log": "For optional PSR-3 debug logging", - "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", - "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" - }, - "type": "library", - "autoload": { - "psr-4": { - "PHPMailer\\PHPMailer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1-only" - ], - "authors": [ - { - "name": "Marcus Bointon", - "email": "phpmailer@synchromedia.co.uk" - }, - { - "name": "Jim Jagielski", - "email": "jimjag@gmail.com" - }, - { - "name": "Andy Prevost", - "email": "codeworxtech@users.sourceforge.net" - }, - { - "name": "Brent R. Matzelle" - } - ], - "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "support": { - "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.0" - }, - "funding": [ - { - "url": "https://github.com/Synchro", - "type": "github" - } - ], - "time": "2022-02-28T15:31:21+00:00" - }, - { - "name": "psr/log", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" - }, - "time": "2021-05-03T11:20:27+00:00" - }, - { - "name": "resque/php-resque", - "version": "v1.3.6", - "source": { - "type": "git", - "url": "https://github.com/resque/php-resque.git", - "reference": "fe41c04763699b1318d97ed14cc78583e9380161" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/resque/php-resque/zipball/fe41c04763699b1318d97ed14cc78583e9380161", - "reference": "fe41c04763699b1318d97ed14cc78583e9380161", - "shasum": "" - }, - "require": { - "colinmollenhour/credis": "~1.7", - "php": ">=5.6.0", - "psr/log": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, - "suggest": { - "ext-pcntl": "REQUIRED for forking processes on platforms that support it (so anything but Windows).", - "ext-proctitle": "Allows php-resque to rename the title of UNIX processes to show the status of a worker.", - "ext-redis": "Native PHP extension for Redis connectivity. Credis will automatically utilize when available." - }, - "bin": [ - "bin/resque", - "bin/resque-scheduler" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Resque": "lib", - "ResqueScheduler": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dan Hunsaker", - "email": "danhunsaker+resque@gmail.com", - "role": "Maintainer" - }, - { - "name": "Rajib Ahmed", - "homepage": "https://github.com/rajibahmed", - "role": "Maintainer" - }, - { - "name": "Steve Klabnik", - "email": "steve@steveklabnik.com", - "role": "Maintainer" - }, - { - "name": "Chris Boulton", - "email": "chris@bigcommerce.com", - "role": "Creator" - } - ], - "description": "Redis backed library for creating background jobs and processing them later. Based on resque for Ruby.", - "homepage": "http://www.github.com/resque/php-resque/", - "keywords": [ - "background", - "job", - "redis", - "resque" - ], - "support": { - "issues": "https://github.com/resque/php-resque/issues", - "source": "https://github.com/resque/php-resque/tree/v1.3.6" - }, - "time": "2020-04-16T16:39:50+00:00" - }, - { - "name": "slickdeals/statsd", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/Slickdeals/statsd-php.git", - "reference": "225588a0a079e145359049f6e5e23eedb1b4c17f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Slickdeals/statsd-php/zipball/225588a0a079e145359049f6e5e23eedb1b4c17f", - "reference": "225588a0a079e145359049f6e5e23eedb1b4c17f", - "shasum": "" - }, - "require": { - "php": ">= 7.3 || ^8" - }, - "replace": { - "domnikl/statsd": "self.version" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.0", - "phpunit/phpunit": "^9", - "vimeo/psalm": "^4.6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Domnikl\\Statsd\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dominik Liebler", - "email": "liebler.dominik@gmail.com" - } - ], - "description": "a PHP client for statsd", - "homepage": "https://github.com/Slickdeals/statsd-php", - "keywords": [ - "Metrics", - "monitoring", - "statistics", - "statsd", - "udp" - ], - "support": { - "issues": "https://github.com/Slickdeals/statsd-php/issues", - "source": "https://github.com/Slickdeals/statsd-php/tree/3.1.0" - }, - "time": "2021-06-04T20:33:46+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "utopia-php/abuse", - "version": "0.16.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/abuse.git", - "reference": "6370d9150425460416583feba0990504ac789e98" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/abuse/zipball/6370d9150425460416583feba0990504ac789e98", - "reference": "6370d9150425460416583feba0990504ac789e98", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-pdo": "*", - "php": ">=8.0", - "utopia-php/database": "0.28.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.4", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Abuse\\": "src/Abuse" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple abuse library to manage application usage limits", - "keywords": [ - "Abuse", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/abuse/issues", - "source": "https://github.com/utopia-php/abuse/tree/0.16.0" - }, - "time": "2022-10-31T14:46:41+00:00" - }, - { - "name": "utopia-php/analytics", - "version": "0.2.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/analytics.git", - "reference": "adfc2d057a7f6ab618a77c8a20ed3e35485ff416" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/analytics/zipball/adfc2d057a7f6ab618a77c8a20ed3e35485ff416", - "reference": "adfc2d057a7f6ab618a77c8a20ed3e35485ff416", - "shasum": "" - }, - "require": { - "php": ">=7.4" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Analytics\\": "src/Analytics" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Torsten Dittmann", - "email": "torsten@appwrite.io" - } - ], - "description": "A simple library to track events & users.", - "keywords": [ - "analytics", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/analytics/issues", - "source": "https://github.com/utopia-php/analytics/tree/0.2.0" - }, - "time": "2021-03-23T21:33:07+00:00" - }, - { - "name": "utopia-php/audit", - "version": "0.17.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/audit.git", - "reference": "455471bd4de8d74026809e843f8c9740eb32922c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/audit/zipball/455471bd4de8d74026809e843f8c9740eb32922c", - "reference": "455471bd4de8d74026809e843f8c9740eb32922c", - "shasum": "" - }, - "require": { - "ext-pdo": "*", - "php": ">=8.0", - "utopia-php/database": "0.28.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Audit\\": "src/Audit" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A simple audit library to manage application users logs", - "keywords": [ - "Audit", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/audit/issues", - "source": "https://github.com/utopia-php/audit/tree/0.17.0" - }, - "time": "2022-10-31T14:44:52+00:00" - }, - { - "name": "utopia-php/cache", - "version": "0.8.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/cache.git", - "reference": "212e66100a1f32e674fca5d9bc317cc998303089" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/cache/zipball/212e66100a1f32e674fca5d9bc317cc998303089", - "reference": "212e66100a1f32e674fca5d9bc317cc998303089", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-memcached": "*", - "ext-redis": "*", - "php": ">=8.0" - }, - "require-dev": { - "laravel/pint": "1.2.*", - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.13.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Cache\\": "src/Cache" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A simple cache library to manage application cache storing, loading and purging", - "keywords": [ - "cache", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/cache/issues", - "source": "https://github.com/utopia-php/cache/tree/0.8.0" - }, - "time": "2022-10-16T16:48:09+00:00" - }, - { - "name": "utopia-php/cli", - "version": "0.14.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/cli.git", - "reference": "c30ef985a4e739758a0d95eb0706b357b6d8c086" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/cli/zipball/c30ef985a4e739758a0d95eb0706b357b6d8c086", - "reference": "c30ef985a4e739758a0d95eb0706b357b6d8c086", - "shasum": "" - }, - "require": { - "php": ">=7.4", - "utopia-php/framework": "0.*.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "squizlabs/php_codesniffer": "^3.6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\CLI\\": "src/CLI" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple CLI library to manage command line applications", - "keywords": [ - "cli", - "command line", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/cli/issues", - "source": "https://github.com/utopia-php/cli/tree/0.14.0" - }, - "time": "2022-10-09T10:19:07+00:00" - }, - { - "name": "utopia-php/config", - "version": "0.2.2", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/config.git", - "reference": "a3d7bc0312d7150d5e04b1362dc34b2b136908cc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/config/zipball/a3d7bc0312d7150d5e04b1362dc34b2b136908cc", - "reference": "a3d7bc0312d7150d5e04b1362dc34b2b136908cc", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Config\\": "src/Config" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple Config library to managing application config variables", - "keywords": [ - "config", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/config/issues", - "source": "https://github.com/utopia-php/config/tree/0.2.2" - }, - "time": "2020-10-24T09:49:09+00:00" - }, - { - "name": "utopia-php/database", - "version": "dev-increment", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/database.git", - "reference": "fc0a8bfc9826e1e64521a8e7a95904f9a999d6fb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/fc0a8bfc9826e1e64521a8e7a95904f9a999d6fb", - "reference": "fc0a8bfc9826e1e64521a8e7a95904f9a999d6fb", - "shasum": "" - }, - "require": { - "ext-pdo": "*", - "php": ">=8.0", - "utopia-php/cache": "0.8.*", - "utopia-php/framework": "0.*.*", - "utopia-php/mongo": "0.0.2" - }, - "require-dev": { - "ext-mongodb": "*", - "ext-redis": "*", - "fakerphp/faker": "^1.14", - "mongodb/mongodb": "1.8.0", - "phpunit/phpunit": "^9.4", - "swoole/ide-helper": "4.8.0", - "utopia-php/cli": "^0.11.0", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Database\\": "src/Database" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A simple library to manage application persistency using multiple database adapters", - "keywords": [ - "database", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/increment" - }, - "time": "2022-12-08T08:59:37+00:00" - }, - { - "name": "utopia-php/domains", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/domains.git", - "reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/domains/zipball/1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73", - "reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Domains\\": "src/Domains" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "Utopia Domains library is simple and lite library for parsing web domains. This library is aiming to be as simple and easy to learn and use.", - "keywords": [ - "domains", - "framework", - "icann", - "php", - "public suffix", - "tld", - "tld extract", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/domains/issues", - "source": "https://github.com/utopia-php/domains/tree/master" - }, - "time": "2020-02-23T07:40:02+00:00" - }, - { - "name": "utopia-php/dsn", - "version": "0.1.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/dsn.git", - "reference": "17a5935eab1b89fb4b95600db50a1b6d5faa6cea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/dsn/zipball/17a5935eab1b89fb4b95600db50a1b6d5faa6cea", - "reference": "17a5935eab1b89fb4b95600db50a1b6d5faa6cea", - "shasum": "" - }, - "require": { - "php": ">=8.0" - }, - "require-dev": { - "laravel/pint": "1.2.*", - "phpunit/phpunit": "^9.3", - "squizlabs/php_codesniffer": "^3.6", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\DSN\\": "src/DSN" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A simple library for parsing and managing Data Source Names ( DSNs )", - "keywords": [ - "dsn", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/dsn/issues", - "source": "https://github.com/utopia-php/dsn/tree/0.1.0" - }, - "time": "2022-10-26T10:06:20+00:00" - }, - { - "name": "utopia-php/framework", - "version": "0.25.1", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/framework.git", - "reference": "2391b397135586b2100d39e338827bef8d2f4ad0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/framework/zipball/2391b397135586b2100d39e338827bef8d2f4ad0", - "reference": "2391b397135586b2100d39e338827bef8d2f4ad0", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "require-dev": { - "laravel/pint": "^1.2", - "phpunit/phpunit": "^9.5.25", - "vimeo/psalm": "4.27.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A simple, light and advanced PHP framework", - "keywords": [ - "framework", - "php", - "upf" - ], - "support": { - "issues": "https://github.com/utopia-php/framework/issues", - "source": "https://github.com/utopia-php/framework/tree/0.25.1" - }, - "time": "2022-11-23T18:22:23+00:00" - }, - { - "name": "utopia-php/image", - "version": "0.5.4", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/image.git", - "reference": "ca5f436f9aa22dedaa6648f24f3687733808e336" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/image/zipball/ca5f436f9aa22dedaa6648f24f3687733808e336", - "reference": "ca5f436f9aa22dedaa6648f24f3687733808e336", - "shasum": "" - }, - "require": { - "ext-imagick": "*", - "php": ">=8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.13.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Image\\": "src/Image" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple Image manipulation library", - "keywords": [ - "framework", - "image", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/image/issues", - "source": "https://github.com/utopia-php/image/tree/0.5.4" - }, - "time": "2022-05-11T12:30:41+00:00" - }, - { - "name": "utopia-php/locale", - "version": "0.4.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/locale.git", - "reference": "c2d9358d0fe2f6b6ed5448369f9d1e430c615447" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/locale/zipball/c2d9358d0fe2f6b6ed5448369f9d1e430c615447", - "reference": "c2d9358d0fe2f6b6ed5448369f9d1e430c615447", - "shasum": "" - }, - "require": { - "php": ">=7.4" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Locale\\": "src/Locale" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple locale library to manage application translations", - "keywords": [ - "framework", - "locale", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/locale/issues", - "source": "https://github.com/utopia-php/locale/tree/0.4.0" - }, - "time": "2021-07-24T11:35:55+00:00" - }, - { - "name": "utopia-php/logger", - "version": "0.3.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/logger.git", - "reference": "079656cb5169ca9600861eda0b6819199e3d4a57" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/logger/zipball/079656cb5169ca9600861eda0b6819199e3d4a57", - "reference": "079656cb5169ca9600861eda0b6819199e3d4a57", - "shasum": "" - }, - "require": { - "php": ">=8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Logger\\": "src/Logger" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Matej Bačo", - "email": "matej@appwrite.io" - }, - { - "name": "Christy Jacob", - "email": "christy@appwrite.io" - } - ], - "description": "Utopia Logger library is simple and lite library for logging information, such as errors or warnings. This library is aiming to be as simple and easy to learn and use.", - "keywords": [ - "appsignal", - "errors", - "framework", - "logger", - "logging", - "logs", - "php", - "raygun", - "sentry", - "upf", - "utopia", - "warnings" - ], - "support": { - "issues": "https://github.com/utopia-php/logger/issues", - "source": "https://github.com/utopia-php/logger/tree/0.3.0" - }, - "time": "2022-03-18T10:56:57+00:00" - }, - { - "name": "utopia-php/messaging", - "version": "0.1.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/messaging.git", - "reference": "501272fad666f06bec8f130076862e7981a73f8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/messaging/zipball/501272fad666f06bec8f130076862e7981a73f8c", - "reference": "501272fad666f06bec8f130076862e7981a73f8c", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": ">=8.0.0" - }, - "require-dev": { - "phpmailer/phpmailer": "6.6.*", - "phpunit/phpunit": "9.5.*", - "squizlabs/php_codesniffer": "^3.6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Messaging\\": "src/Utopia/Messaging" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jake Barnby", - "email": "jake@appwrite.io" - } - ], - "description": "A simple, light and advanced PHP messaging library", - "keywords": [ - "library", - "messaging", - "php", - "upf", - "utopia", - "utopia-php" - ], - "support": { - "issues": "https://github.com/utopia-php/messaging/issues", - "source": "https://github.com/utopia-php/messaging/tree/0.1.0" - }, - "time": "2022-09-29T11:22:48+00:00" - }, - { - "name": "utopia-php/mongo", - "version": "0.0.2", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/mongo.git", - "reference": "62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/mongo/zipball/62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e", - "reference": "62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e", - "shasum": "" - }, - "require": { - "ext-mongodb": "*", - "mongodb/mongodb": "1.8.0", - "php": ">=8.0" - }, - "require-dev": { - "fakerphp/faker": "^1.14", - "laravel/pint": "1.2.*", - "phpstan/phpstan": "1.8.*", - "phpunit/phpunit": "^9.4", - "swoole/ide-helper": "4.8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Mongo\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Wess", - "email": "wess@appwrite.io" - } - ], - "description": "A simple library to manage Mongo database", - "keywords": [ - "database", - "mongo", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/mongo/issues", - "source": "https://github.com/utopia-php/mongo/tree/0.0.2" - }, - "time": "2022-11-08T11:58:46+00:00" - }, - { - "name": "utopia-php/orchestration", - "version": "0.9.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/orchestration.git", - "reference": "1d4f66684b8c4927f31b695817eae6d84aafd172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/orchestration/zipball/1d4f66684b8c4927f31b695817eae6d84aafd172", - "reference": "1d4f66684b8c4927f31b695817eae6d84aafd172", - "shasum": "" - }, - "require": { - "php": ">=8.0", - "utopia-php/cli": "0.14.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Orchestration\\": "src/Orchestration" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Lite & fast micro PHP abstraction library for container orchestration", - "keywords": [ - "docker", - "framework", - "kubernetes", - "orchestration", - "php", - "swarm", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/orchestration/issues", - "source": "https://github.com/utopia-php/orchestration/tree/0.9.0" - }, - "time": "2022-11-09T17:38:00+00:00" - }, - { - "name": "utopia-php/platform", - "version": "0.3.1", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/platform.git", - "reference": "fe9f64420957dc8fb6201d22b499572f021411e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/platform/zipball/fe9f64420957dc8fb6201d22b499572f021411e4", - "reference": "fe9f64420957dc8fb6201d22b499572f021411e4", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-redis": "*", - "php": ">=8.0", - "utopia-php/cli": "0.14.*", - "utopia-php/framework": "0.25.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "squizlabs/php_codesniffer": "^3.6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Platform\\": "src/Platform" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Light and Fast Platform Library", - "keywords": [ - "cache", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/platform/issues", - "source": "https://github.com/utopia-php/platform/tree/0.3.1" - }, - "time": "2022-11-10T07:04:24+00:00" - }, - { - "name": "utopia-php/pools", - "version": "0.4.2", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/pools.git", - "reference": "d2870ab74b31b7f4027799f082e85122154f8bed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/pools/zipball/d2870ab74b31b7f4027799f082e85122154f8bed", - "reference": "d2870ab74b31b7f4027799f082e85122154f8bed", - "shasum": "" - }, - "require": { - "php": ">=8.0" - }, - "require-dev": { - "laravel/pint": "1.2.*", - "phpstan/phpstan": "1.8.*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Pools\\": "src/Pools" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Team Appwrite", - "email": "team@appwrite.io" - } - ], - "description": "A simple library to manage connection pools", - "keywords": [ - "framework", - "php", - "pools", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/pools/issues", - "source": "https://github.com/utopia-php/pools/tree/0.4.2" - }, - "time": "2022-11-22T07:55:45+00:00" - }, - { - "name": "utopia-php/preloader", - "version": "0.2.4", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/preloader.git", - "reference": "65ef48392e72172f584b0baa2e224f9a1cebcce0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/preloader/zipball/65ef48392e72172f584b0baa2e224f9a1cebcce0", - "reference": "65ef48392e72172f584b0baa2e224f9a1cebcce0", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Preloader\\": "src/Preloader" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "team@appwrite.io" - } - ], - "description": "Utopia Preloader library is simple and lite library for managing PHP preloading configuration", - "keywords": [ - "framework", - "php", - "preload", - "preloader", - "preloading", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/preloader/issues", - "source": "https://github.com/utopia-php/preloader/tree/0.2.4" - }, - "time": "2020-10-24T07:04:59+00:00" - }, - { - "name": "utopia-php/queue", - "version": "0.5.1", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/queue.git", - "reference": "4b39e1f232b2e619b0d7fb4004f2356df334ddc1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/queue/zipball/4b39e1f232b2e619b0d7fb4004f2356df334ddc1", - "reference": "4b39e1f232b2e619b0d7fb4004f2356df334ddc1", - "shasum": "" - }, - "require": { - "php": ">=8.0", - "utopia-php/cli": "0.14.*", - "utopia-php/framework": "0.*.*" - }, - "require-dev": { - "laravel/pint": "^0.2.3", - "phpstan/phpstan": "^1.8", - "phpunit/phpunit": "^9.5.5", - "swoole/ide-helper": "4.8.8", - "workerman/workerman": "^4.0" - }, - "suggest": { - "ext-swoole": "Needed to support Swoole.", - "workerman/workerman": "Needed to support Workerman." - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Queue\\": "src/Queue" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Torsten Dittmann", - "email": "torsten@appwrite.io" - } - ], - "description": "A powerful task queue.", - "keywords": [ - "Tasks", - "framework", - "php", - "queue", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/queue/issues", - "source": "https://github.com/utopia-php/queue/tree/0.5.1" - }, - "time": "2022-11-16T19:47:26+00:00" - }, - { - "name": "utopia-php/registry", - "version": "0.5.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/registry.git", - "reference": "bedc4ed54527b2803e6dfdccc39449f98522b70d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/registry/zipball/bedc4ed54527b2803e6dfdccc39449f98522b70d", - "reference": "bedc4ed54527b2803e6dfdccc39449f98522b70d", - "shasum": "" - }, - "require": { - "php": ">=7.4" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Registry\\": "src/Registry" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple dependency management library for PHP", - "keywords": [ - "dependency management", - "di", - "framework", - "php", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/registry/issues", - "source": "https://github.com/utopia-php/registry/tree/0.5.0" - }, - "time": "2021-03-10T10:45:22+00:00" - }, - { - "name": "utopia-php/storage", - "version": "0.13.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/storage.git", - "reference": "f34c010e4f8394a6b4aff70b6de55041d9a145d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/storage/zipball/f34c010e4f8394a6b4aff70b6de55041d9a145d3", - "reference": "f34c010e4f8394a6b4aff70b6de55041d9a145d3", - "shasum": "" - }, - "require": { - "ext-fileinfo": "*", - "ext-zlib": "*", - "ext-zstd": "*", - "php": ">=8.0", - "utopia-php/framework": "0.*.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Storage\\": "src/Storage" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "description": "A simple Storage library to manage application storage", - "keywords": [ - "framework", - "php", - "storage", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/storage/issues", - "source": "https://github.com/utopia-php/storage/tree/0.13.0" - }, - "time": "2022-11-17T15:10:18+00:00" - }, - { - "name": "utopia-php/swoole", - "version": "0.5.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/swoole.git", - "reference": "c2a3a4f944a2f22945af3cbcb95b13f0769628b1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/swoole/zipball/c2a3a4f944a2f22945af3cbcb95b13f0769628b1", - "reference": "c2a3a4f944a2f22945af3cbcb95b13f0769628b1", - "shasum": "" - }, - "require": { - "ext-swoole": "*", - "php": ">=8.0", - "utopia-php/framework": "0.*.*" - }, - "require-dev": { - "laravel/pint": "1.2.*", - "phpunit/phpunit": "^9.3", - "swoole/ide-helper": "4.8.3", - "vimeo/psalm": "4.15.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\Swoole\\": "src/Swoole" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "An extension for Utopia Framework to work with PHP Swoole as a PHP FPM alternative", - "keywords": [ - "framework", - "http", - "php", - "server", - "swoole", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/swoole/issues", - "source": "https://github.com/utopia-php/swoole/tree/0.5.0" - }, - "time": "2022-10-19T22:19:07+00:00" - }, - { - "name": "utopia-php/system", - "version": "0.6.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/system.git", - "reference": "289c4327713deadc9c748b5317d248133a02f245" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/system/zipball/289c4327713deadc9c748b5317d248133a02f245", - "reference": "289c4327713deadc9c748b5317d248133a02f245", - "shasum": "" - }, - "require": { - "laravel/pint": "1.2.*", - "php": ">=7.4" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "squizlabs/php_codesniffer": "^3.6", - "vimeo/psalm": "4.0.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\System\\": "src/System" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Torsten Dittmann", - "email": "torsten@appwrite.io" - } - ], - "description": "A simple library for obtaining information about the host's system.", - "keywords": [ - "framework", - "php", - "system", - "upf", - "utopia" - ], - "support": { - "issues": "https://github.com/utopia-php/system/issues", - "source": "https://github.com/utopia-php/system/tree/0.6.0" - }, - "time": "2022-11-07T13:51:59+00:00" - }, - { - "name": "utopia-php/websocket", - "version": "0.1.0", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/websocket.git", - "reference": "51fcb86171400d8aa40d76c54593481fd273dab5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/websocket/zipball/51fcb86171400d8aa40d76c54593481fd273dab5", - "reference": "51fcb86171400d8aa40d76c54593481fd273dab5", - "shasum": "" - }, - "require": { - "php": ">=8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5.5", - "swoole/ide-helper": "4.6.6", - "textalk/websocket": "1.5.2", - "vimeo/psalm": "^4.8.1", - "workerman/workerman": "^4.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Utopia\\WebSocket\\": "src/WebSocket" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Torsten Dittmann", - "email": "torsten@appwrite.io" - } - ], - "description": "A simple abstraction for WebSocket servers.", - "keywords": [ - "framework", - "php", - "upf", - "utopia", - "websocket" - ], - "support": { - "issues": "https://github.com/utopia-php/websocket/issues", - "source": "https://github.com/utopia-php/websocket/tree/0.1.0" - }, - "time": "2021-12-20T10:50:09+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "php": "^7.2 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" - }, - "time": "2022-06-03T18:03:27+00:00" - } - ], - "packages-dev": [ - { - "name": "appwrite/sdk-generator", - "version": "0.28.1", - "source": { - "type": "git", - "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "ed8d3daa66589733b49b11c053d524cdf576ffee" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ed8d3daa66589733b49b11c053d524cdf576ffee", - "reference": "ed8d3daa66589733b49b11c053d524cdf576ffee", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "matthiasmullie/minify": "^1.3.68", - "php": ">=7.0.0", - "twig/twig": "^3.4.1" - }, - "require-dev": { - "brianium/paratest": "^6.4", - "phpunit/phpunit": "^9.5.21" - }, - "type": "library", - "autoload": { - "psr-4": { - "Appwrite\\SDK\\": "src/SDK", - "Appwrite\\Spec\\": "src/Spec" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], - "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.28.1" - }, - "time": "2022-09-22T09:15:54+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.5.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-12-30T00:15:36+00:00" - }, - { - "name": "matthiasmullie/minify", - "version": "1.3.70", - "source": { - "type": "git", - "url": "https://github.com/matthiasmullie/minify.git", - "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/2807d9f9bece6877577ad44acb5c801bb3ae536b", - "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b", - "shasum": "" - }, - "require": { - "ext-pcre": "*", - "matthiasmullie/path-converter": "~1.1", - "php": ">=5.3.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": ">=2.0", - "matthiasmullie/scrapbook": ">=1.3", - "phpunit/phpunit": ">=4.8", - "squizlabs/php_codesniffer": ">=3.0" - }, - "suggest": { - "psr/cache-implementation": "Cache implementation to use with Minify::cache" - }, - "bin": [ - "bin/minifycss", - "bin/minifyjs" - ], - "type": "library", - "autoload": { - "psr-4": { - "MatthiasMullie\\Minify\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthias Mullie", - "email": "minify@mullie.eu", - "homepage": "https://www.mullie.eu", - "role": "Developer" - } - ], - "description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.", - "homepage": "https://github.com/matthiasmullie/minify", - "keywords": [ - "JS", - "css", - "javascript", - "minifier", - "minify" - ], - "support": { - "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.70" - }, - "funding": [ - { - "url": "https://github.com/matthiasmullie", - "type": "github" - } - ], - "time": "2022-12-09T12:56:44+00:00" - }, - { - "name": "matthiasmullie/path-converter", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/matthiasmullie/path-converter.git", - "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/path-converter/zipball/e7d13b2c7e2f2268e1424aaed02085518afa02d9", - "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9", - "shasum": "" - }, - "require": { - "ext-pcre": "*", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "MatthiasMullie\\PathConverter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthias Mullie", - "email": "pathconverter@mullie.eu", - "homepage": "http://www.mullie.eu", - "role": "Developer" - } - ], - "description": "Relative path converter", - "homepage": "http://github.com/matthiasmullie/path-converter", - "keywords": [ - "converter", - "path", - "paths", - "relative" - ], - "support": { - "issues": "https://github.com/matthiasmullie/path-converter/issues", - "source": "https://github.com/matthiasmullie/path-converter/tree/1.1.3" - }, - "time": "2019-02-05T23:41:09+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2022-03-03T13:19:32+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.15.3", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039", - "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3" - }, - "time": "2023-01-16T22:05:37+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" - }, - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", - "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.1", - "phpunit/phpunit": "^9.5", - "rector/rector": "^0.13.9", - "vimeo/psalm": "^4.25" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "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.2" - }, - "time": "2022-10-14T12:47:21+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.16.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be8cac52a0827776ff9ccda8c381ac5b71aeb359", - "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.16.0" - }, - "time": "2022-11-29T15:06:56+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.24", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed", - "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.14", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-01-26T08:26:55+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-12-02T12:48:52+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.5.20", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba", - "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.13", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", - "sebastian/version": "^3.0.2" - }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.5-dev" - } - }, - "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20" - }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-04-01T12:37:26+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:08:49+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-09-14T12:41:17+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:52:27+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:10:38+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-04-03T09:37:03+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-09-14T06:03:37+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-02-14T08:28:10+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-28T06:42:11+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" - }, - { - "name": "sebastian/type", - "version": "3.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-09-12T14:47:03+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.7.1", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2022-06-18T07:21:10+00:00" - }, - { - "name": "swoole/ide-helper", - "version": "4.8.9", - "source": { - "type": "git", - "url": "https://github.com/swoole/ide-helper.git", - "reference": "8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/swoole/ide-helper/zipball/8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe", - "reference": "8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe", - "shasum": "" - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Team Swoole", - "email": "team@swoole.com" - } - ], - "description": "IDE help files for Swoole.", - "support": { - "issues": "https://github.com/swoole/ide-helper/issues", - "source": "https://github.com/swoole/ide-helper/tree/4.8.9" - }, - "funding": [ - { - "url": "https://gitee.com/swoole/swoole?donate=true", - "type": "custom" - }, - { - "url": "https://github.com/swoole", - "type": "github" - } - ], - "time": "2022-04-18T20:38:04+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "textalk/websocket", - "version": "1.5.7", - "source": { - "type": "git", - "url": "https://github.com/Textalk/websocket-php.git", - "reference": "1712325e99b6bf869ccbf9bf41ab749e7328ea46" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Textalk/websocket-php/zipball/1712325e99b6bf869ccbf9bf41ab749e7328ea46", - "reference": "1712325e99b6bf869ccbf9bf41ab749e7328ea46", - "shasum": "" - }, - "require": { - "php": "^7.2 | ^8.0", - "psr/log": "^1 | ^2 | ^3" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.0", - "phpunit/phpunit": "^8.0|^9.0", - "squizlabs/php_codesniffer": "^3.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "WebSocket\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Fredrik Liljegren" - }, - { - "name": "Sören Jensen", - "email": "soren@abicart.se" - } - ], - "description": "WebSocket client and server", - "support": { - "issues": "https://github.com/Textalk/websocket-php/issues", - "source": "https://github.com/Textalk/websocket-php/tree/1.5.7" - }, - "time": "2022-03-29T09:46:59+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "twig/twig", - "version": "v3.5.0", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/3ffcf4b7d890770466da3b2666f82ac054e7ec72", - "reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" - }, - "require-dev": { - "psr/container": "^1.0", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.5-dev" - } - }, - "autoload": { - "psr-4": { - "Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Twig Team", - "role": "Contributors" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "https://twig.symfony.com", - "keywords": [ - "templating" - ], - "support": { - "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.5.0" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/twig/twig", - "type": "tidelift" - } - ], - "time": "2022-12-27T12:28:18+00:00" - } - ], - "aliases": [ - { - "package": "utopia-php/database", - "version": "dev-increment", - "alias": "0.28.0", - "alias_normalized": "0.28.0.0" - } - ], - "minimum-stability": "stable", - "stability-flags": { - "utopia-php/database": 20 - }, - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=8.0.0", - "ext-curl": "*", - "ext-imagick": "*", - "ext-mbstring": "*", - "ext-json": "*", - "ext-yaml": "*", - "ext-dom": "*", - "ext-redis": "*", - "ext-swoole": "*", - "ext-pdo": "*", - "ext-openssl": "*", - "ext-zlib": "*", - "ext-sockets": "*" - }, - "platform-dev": { - "ext-fileinfo": "*" - }, - "platform-overrides": { - "php": "8.0" - }, - "plugin-api-version": "2.2.0" -} diff --git a/docker-compose.yml b/docker-compose.yml index 9be6ff5d8..8eb50fcc2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,15 +33,6 @@ services: - 8080:80 - 443:443 - 9500:8080 - ulimits: - nofile: - soft: 655350 - hard: 655350 - sysctls: - - net.core.somaxconn=1024 - - net.ipv4.tcp_rmem=1024 4096 16384 - - net.ipv4.tcp_wmem=1024 4096 16384 - - net.ipv4.ip_local_port_range=1025 65535 volumes: - /var/run/docker.sock:/var/run/docker.sock - appwrite-config:/storage/config:ro @@ -62,6 +53,7 @@ services: DEBUG: false TESTING: true VERSION: dev + VITE_CONSOLE_MODE: self-hosted ports: - 9501:80 networks: diff --git a/src/Appwrite/Platform/Services/Tasks.php b/src/Appwrite/Platform/Services/Tasks.php index 4fa93a1f6..635722452 100644 --- a/src/Appwrite/Platform/Services/Tasks.php +++ b/src/Appwrite/Platform/Services/Tasks.php @@ -12,7 +12,6 @@ use Appwrite\Platform\Tasks\PatchCreateMissingSchedules; use Appwrite\Platform\Tasks\SDKs; use Appwrite\Platform\Tasks\Specs; use Appwrite\Platform\Tasks\SSL; -use Appwrite\Platform\Tasks\Usage; use Appwrite\Platform\Tasks\Vars; use Appwrite\Platform\Tasks\Version; use Appwrite\Platform\Tasks\VolumeSync; diff --git a/src/Appwrite/Platform/Tasks/Doctor.php b/src/Appwrite/Platform/Tasks/Doctor.php index 9a6d6a284..aafd8f83a 100644 --- a/src/Appwrite/Platform/Tasks/Doctor.php +++ b/src/Appwrite/Platform/Tasks/Doctor.php @@ -2,16 +2,20 @@ namespace Appwrite\Platform\Tasks; +use Appwrite\URL\URL; use Utopia\App; use Utopia\CLI\Console; use Appwrite\ClamAV\Network; use Utopia\Logger\Logger; +use Utopia\Queue\Client; use Utopia\Storage\Device\Local; use Utopia\Storage\Storage; use Utopia\Config\Config; use Utopia\Domains\Domain; use Utopia\Platform\Action; use Utopia\Registry\Registry; +use Utopia\DSN\DSN; +use Utopia\Queue; class Doctor extends Action { @@ -187,6 +191,27 @@ class Doctor extends Action Console::error('🔴 ' . str_pad("SMTP", 47, '.') . 'disconnected'); } + try { + $fallbackForRedis = URL::unparse([ + 'scheme' => 'redis', + 'host' => App::getEnv('_APP_REDIS_HOST', 'redis'), + 'port' => App::getEnv('_APP_REDIS_PORT', '6379'), + 'user' => App::getEnv('_APP_REDIS_USER', ''), + 'pass' => App::getEnv('_APP_REDIS_PASS', ''), + ]); + + $dsn = App::getEnv('_APP_CONNECTIONS_QUEUE', $fallbackForRedis); + $dsn = explode('=', $dsn); + $dsn = $dsn[1] ?? ''; + $dsn = new DSN($dsn); + $connection = new Queue\Connection\Redis($dsn->getHost(), $dsn->getPort()); + $client = new Client('v1-usage', $connection); + $client->getQueueSize(); + Console::success('🟢 ' . str_pad("Usage queue", 50, '.') . 'connected'); + } catch (\Throwable $th) { + Console::error('🔴 ' . str_pad("Usage queue", 47, '.') . 'disconnected'); + } + \sleep(0.2); Console::log(''); From f399394282da3595696caa23281831fe16320b08 Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 2 Feb 2023 13:57:14 +0200 Subject: [PATCH 70/94] addressing comments --- composer.lock | 5090 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 5090 insertions(+) create mode 100644 composer.lock diff --git a/composer.lock b/composer.lock new file mode 100644 index 000000000..3af341a1c --- /dev/null +++ b/composer.lock @@ -0,0 +1,5090 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "36ef20efb91c04f1985f7dbaf52450f5", + "packages": [ + { + "name": "adhocore/jwt", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/adhocore/php-jwt.git", + "reference": "6c434af7170090bb7a8880d2bc220a2254ba7899" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/adhocore/php-jwt/zipball/6c434af7170090bb7a8880d2bc220a2254ba7899", + "reference": "6c434af7170090bb7a8880d2bc220a2254ba7899", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.5 || ^7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ahc\\Jwt\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jitendra Adhikari", + "email": "jiten.adhikary@gmail.com" + } + ], + "description": "Ultra lightweight JSON web token (JWT) library for PHP5.5+.", + "keywords": [ + "auth", + "json-web-token", + "jwt", + "jwt-auth", + "jwt-php", + "token" + ], + "support": { + "issues": "https://github.com/adhocore/php-jwt/issues", + "source": "https://github.com/adhocore/php-jwt/tree/1.1.2" + }, + "funding": [ + { + "url": "https://paypal.me/ji10", + "type": "custom" + } + ], + "time": "2021-02-20T09:56:44+00:00" + }, + { + "name": "appwrite/php-clamav", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/appwrite/php-clamav.git", + "reference": "61d00f24f9e7766fbba233e7b8d09c5475388073" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/appwrite/php-clamav/zipball/61d00f24f9e7766fbba233e7b8d09c5475388073", + "reference": "61d00f24f9e7766fbba233e7b8d09c5475388073", + "shasum": "" + }, + "require": { + "ext-sockets": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Appwrite\\ClamAV\\": "src/ClamAV" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "ClamAV network and pipe client for PHP", + "keywords": [ + "anti virus", + "appwrite", + "clamav", + "php" + ], + "support": { + "issues": "https://github.com/appwrite/php-clamav/issues", + "source": "https://github.com/appwrite/php-clamav/tree/1.1.0" + }, + "time": "2020-10-02T05:23:46+00:00" + }, + { + "name": "appwrite/php-runtimes", + "version": "0.11.1", + "source": { + "type": "git", + "url": "https://github.com/appwrite/runtimes.git", + "reference": "9d74a477ba3333cbcfac565c46fcf19606b7b603" + }, + "require": { + "php": ">=8.0", + "utopia-php/system": "0.6.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Appwrite\\Runtimes\\": "src/Runtimes" + } + }, + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Torsten Dittmann", + "email": "torsten@appwrite.io" + } + ], + "description": "Appwrite repository for Cloud Function runtimes that contains the configurations and tests for all of the Appwrite runtime environments.", + "keywords": [ + "appwrite", + "php", + "runtimes" + ], + "time": "2022-11-07T16:45:52+00:00" + }, + { + "name": "chillerlan/php-qrcode", + "version": "4.3.3", + "source": { + "type": "git", + "url": "https://github.com/chillerlan/php-qrcode.git", + "reference": "6356b246948ac1025882b3f55e7c68ebd4515ae3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/6356b246948ac1025882b3f55e7c68ebd4515ae3", + "reference": "6356b246948ac1025882b3f55e7c68ebd4515ae3", + "shasum": "" + }, + "require": { + "chillerlan/php-settings-container": "^2.1", + "ext-mbstring": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phan/phan": "^5.3", + "phpunit/phpunit": "^9.5", + "setasign/fpdf": "^1.8.2" + }, + "suggest": { + "chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.", + "setasign/fpdf": "Required to use the QR FPDF output." + }, + "type": "library", + "autoload": { + "psr-4": { + "chillerlan\\QRCode\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kazuhiko Arase", + "homepage": "https://github.com/kazuhikoarase" + }, + { + "name": "Smiley", + "email": "smiley@chillerlan.net", + "homepage": "https://github.com/codemasher" + }, + { + "name": "Contributors", + "homepage": "https://github.com/chillerlan/php-qrcode/graphs/contributors" + } + ], + "description": "A QR code generator. PHP 7.4+", + "homepage": "https://github.com/chillerlan/php-qrcode", + "keywords": [ + "phpqrcode", + "qr", + "qr code", + "qrcode", + "qrcode-generator" + ], + "support": { + "issues": "https://github.com/chillerlan/php-qrcode/issues", + "source": "https://github.com/chillerlan/php-qrcode/tree/4.3.3" + }, + "funding": [ + { + "url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", + "type": "custom" + }, + { + "url": "https://ko-fi.com/codemasher", + "type": "ko_fi" + } + ], + "time": "2021-11-25T22:38:09+00:00" + }, + { + "name": "chillerlan/php-settings-container", + "version": "2.1.4", + "source": { + "type": "git", + "url": "https://github.com/chillerlan/php-settings-container.git", + "reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/1beb7df3c14346d4344b0b2e12f6f9a74feabd4a", + "reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phan/phan": "^5.3", + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "chillerlan\\Settings\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Smiley", + "email": "smiley@chillerlan.net", + "homepage": "https://github.com/codemasher" + } + ], + "description": "A container class for immutable settings objects. Not a DI container. PHP 7.4+", + "homepage": "https://github.com/chillerlan/php-settings-container", + "keywords": [ + "PHP7", + "Settings", + "configuration", + "container", + "helper" + ], + "support": { + "issues": "https://github.com/chillerlan/php-settings-container/issues", + "source": "https://github.com/chillerlan/php-settings-container" + }, + "funding": [ + { + "url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", + "type": "custom" + }, + { + "url": "https://ko-fi.com/codemasher", + "type": "ko_fi" + } + ], + "time": "2022-07-05T22:32:14+00:00" + }, + { + "name": "colinmollenhour/credis", + "version": "v1.14.0", + "source": { + "type": "git", + "url": "https://github.com/colinmollenhour/credis.git", + "reference": "dccc8a46586475075fbb012d8bd523b8a938c2dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/dccc8a46586475075fbb012d8bd523b8a938c2dc", + "reference": "dccc8a46586475075fbb012d8bd523b8a938c2dc", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "suggest": { + "ext-redis": "Improved performance for communicating with redis" + }, + "type": "library", + "autoload": { + "classmap": [ + "Client.php", + "Cluster.php", + "Sentinel.php", + "Module.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Colin Mollenhour", + "email": "colin@mollenhour.com" + } + ], + "description": "Credis is a lightweight interface to the Redis key-value store which wraps the phpredis library when available for better performance.", + "homepage": "https://github.com/colinmollenhour/credis", + "support": { + "issues": "https://github.com/colinmollenhour/credis/issues", + "source": "https://github.com/colinmollenhour/credis/tree/v1.14.0" + }, + "time": "2022-11-09T01:18:39+00:00" + }, + { + "name": "composer/package-versions-deprecated", + "version": "1.11.99.5", + "source": { + "type": "git", + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0", + "php": "^7 || ^8" + }, + "replace": { + "ocramius/package-versions": "1.11.99" + }, + "require-dev": { + "composer/composer": "^1.9.3 || ^2.0@dev", + "ext-zip": "^1.13", + "phpunit/phpunit": "^6.5 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "support": { + "issues": "https://github.com/composer/package-versions-deprecated/issues", + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-01-17T14:14:24+00:00" + }, + { + "name": "dragonmantank/cron-expression", + "version": "v3.3.1", + "source": { + "type": "git", + "url": "https://github.com/dragonmantank/cron-expression.git", + "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/be85b3f05b46c39bbc0d95f6c071ddff669510fa", + "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0", + "webmozart/assert": "^1.0" + }, + "replace": { + "mtdowling/cron-expression": "^1.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-webmozart-assert": "^1.0", + "phpunit/phpunit": "^7.0|^8.0|^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Cron\\": "src/Cron/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Tankersley", + "email": "chris@ctankersley.com", + "homepage": "https://github.com/dragonmantank" + } + ], + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": [ + "cron", + "schedule" + ], + "support": { + "issues": "https://github.com/dragonmantank/cron-expression/issues", + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.1" + }, + "funding": [ + { + "url": "https://github.com/dragonmantank", + "type": "github" + } + ], + "time": "2022-01-18T15:43:28+00:00" + }, + { + "name": "jean85/pretty-package-versions", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/Jean85/pretty-package-versions.git", + "reference": "1e0104b46f045868f11942aea058cd7186d6c303" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/1e0104b46f045868f11942aea058cd7186d6c303", + "reference": "1e0104b46f045868f11942aea058cd7186d6c303", + "shasum": "" + }, + "require": { + "composer/package-versions-deprecated": "^1.8.0", + "php": "^7.0|^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0|^8.5|^9.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Jean85\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alessandro Lai", + "email": "alessandro.lai85@gmail.com" + } + ], + "description": "A wrapper for ocramius/package-versions to get pretty versions strings", + "keywords": [ + "composer", + "package", + "release", + "versions" + ], + "support": { + "issues": "https://github.com/Jean85/pretty-package-versions/issues", + "source": "https://github.com/Jean85/pretty-package-versions/tree/1.6.0" + }, + "time": "2021-02-04T16:20:16+00:00" + }, + { + "name": "laravel/pint", + "version": "v1.2.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/pint.git", + "reference": "e60e2112ee779ce60f253695b273d1646a17d6f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/pint/zipball/e60e2112ee779ce60f253695b273d1646a17d6f1", + "reference": "e60e2112ee779ce60f253695b273d1646a17d6f1", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "ext-tokenizer": "*", + "ext-xml": "*", + "php": "^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.11.0", + "illuminate/view": "^9.32.0", + "laravel-zero/framework": "^9.2.0", + "mockery/mockery": "^1.5.1", + "nunomaduro/larastan": "^2.2.0", + "nunomaduro/termwind": "^1.14.0", + "pestphp/pest": "^1.22.1" + }, + "bin": [ + "builds/pint" + ], + "type": "project", + "autoload": { + "psr-4": { + "App\\": "app/", + "Database\\Seeders\\": "database/seeders/", + "Database\\Factories\\": "database/factories/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "An opinionated code formatter for PHP.", + "homepage": "https://laravel.com", + "keywords": [ + "format", + "formatter", + "lint", + "linter", + "php" + ], + "support": { + "issues": "https://github.com/laravel/pint/issues", + "source": "https://github.com/laravel/pint" + }, + "time": "2022-11-29T16:25:20+00:00" + }, + { + "name": "matomo/device-detector", + "version": "6.0.0", + "source": { + "type": "git", + "url": "https://github.com/matomo-org/device-detector.git", + "reference": "7fc2af3af62bd69e6e3404d561e371a83c112be9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/matomo-org/device-detector/zipball/7fc2af3af62bd69e6e3404d561e371a83c112be9", + "reference": "7fc2af3af62bd69e6e3404d561e371a83c112be9", + "shasum": "" + }, + "require": { + "mustangostang/spyc": "*", + "php": "^7.2|^8.0" + }, + "replace": { + "piwik/device-detector": "self.version" + }, + "require-dev": { + "matthiasmullie/scrapbook": "^1.4.7", + "mayflower/mo4-coding-standard": "^v8.0.0", + "phpstan/phpstan": "^0.12.52", + "phpunit/phpunit": "^8.5.8", + "psr/cache": "^1.0.1", + "psr/simple-cache": "^1.0.1", + "symfony/yaml": "^5.1.7" + }, + "suggest": { + "doctrine/cache": "Can directly be used for caching purpose", + "ext-yaml": "Necessary for using the Pecl YAML parser" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeviceDetector\\": "" + }, + "exclude-from-classmap": [ + "Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "The Matomo Team", + "email": "hello@matomo.org", + "homepage": "https://matomo.org/team/" + } + ], + "description": "The Universal Device Detection library, that parses User Agents and detects devices (desktop, tablet, mobile, tv, cars, console, etc.), clients (browsers, media players, mobile apps, feed readers, libraries, etc), operating systems, devices, brands and models.", + "homepage": "https://matomo.org", + "keywords": [ + "devicedetection", + "parser", + "useragent" + ], + "support": { + "forum": "https://forum.matomo.org/", + "issues": "https://github.com/matomo-org/device-detector/issues", + "source": "https://github.com/matomo-org/matomo", + "wiki": "https://dev.matomo.org/" + }, + "time": "2022-04-11T09:58:17+00:00" + }, + { + "name": "mongodb/mongodb", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/mongodb/mongo-php-library.git", + "reference": "953dbc19443aa9314c44b7217a16873347e6840d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/953dbc19443aa9314c44b7217a16873347e6840d", + "reference": "953dbc19443aa9314c44b7217a16873347e6840d", + "shasum": "" + }, + "require": { + "ext-hash": "*", + "ext-json": "*", + "ext-mongodb": "^1.8.1", + "jean85/pretty-package-versions": "^1.2", + "php": "^7.0 || ^8.0", + "symfony/polyfill-php80": "^1.19" + }, + "require-dev": { + "squizlabs/php_codesniffer": "^3.5, <3.5.5", + "symfony/phpunit-bridge": "5.x-dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "MongoDB\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Andreas Braun", + "email": "andreas.braun@mongodb.com" + }, + { + "name": "Jeremy Mikola", + "email": "jmikola@gmail.com" + } + ], + "description": "MongoDB driver library", + "homepage": "https://jira.mongodb.org/browse/PHPLIB", + "keywords": [ + "database", + "driver", + "mongodb", + "persistence" + ], + "support": { + "issues": "https://github.com/mongodb/mongo-php-library/issues", + "source": "https://github.com/mongodb/mongo-php-library/tree/1.8.0" + }, + "time": "2020-11-25T12:26:02+00:00" + }, + { + "name": "mustangostang/spyc", + "version": "0.6.3", + "source": { + "type": "git", + "url": "git@github.com:mustangostang/spyc.git", + "reference": "4627c838b16550b666d15aeae1e5289dd5b77da0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mustangostang/spyc/zipball/4627c838b16550b666d15aeae1e5289dd5b77da0", + "reference": "4627c838b16550b666d15aeae1e5289dd5b77da0", + "shasum": "" + }, + "require": { + "php": ">=5.3.1" + }, + "require-dev": { + "phpunit/phpunit": "4.3.*@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.5.x-dev" + } + }, + "autoload": { + "files": [ + "Spyc.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "mustangostang", + "email": "vlad.andersen@gmail.com" + } + ], + "description": "A simple YAML loader/dumper class for PHP", + "homepage": "https://github.com/mustangostang/spyc/", + "keywords": [ + "spyc", + "yaml", + "yml" + ], + "time": "2019-09-10T13:16:29+00:00" + }, + { + "name": "phpmailer/phpmailer", + "version": "v6.6.0", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e43bac82edc26ca04b36143a48bde1c051cfd5b1", + "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-filter": "*", + "ext-hash": "*", + "php": ">=5.5.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "doctrine/annotations": "^1.2", + "php-parallel-lint/php-console-highlighter": "^0.5.0", + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.3.5", + "roave/security-advisories": "dev-latest", + "squizlabs/php_codesniffer": "^3.6.2", + "yoast/phpunit-polyfills": "^1.0.0" + }, + "suggest": { + "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-only" + ], + "authors": [ + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "support": { + "issues": "https://github.com/PHPMailer/PHPMailer/issues", + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.0" + }, + "funding": [ + { + "url": "https://github.com/Synchro", + "type": "github" + } + ], + "time": "2022-02-28T15:31:21+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "resque/php-resque", + "version": "v1.3.6", + "source": { + "type": "git", + "url": "https://github.com/resque/php-resque.git", + "reference": "fe41c04763699b1318d97ed14cc78583e9380161" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/resque/php-resque/zipball/fe41c04763699b1318d97ed14cc78583e9380161", + "reference": "fe41c04763699b1318d97ed14cc78583e9380161", + "shasum": "" + }, + "require": { + "colinmollenhour/credis": "~1.7", + "php": ">=5.6.0", + "psr/log": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "suggest": { + "ext-pcntl": "REQUIRED for forking processes on platforms that support it (so anything but Windows).", + "ext-proctitle": "Allows php-resque to rename the title of UNIX processes to show the status of a worker.", + "ext-redis": "Native PHP extension for Redis connectivity. Credis will automatically utilize when available." + }, + "bin": [ + "bin/resque", + "bin/resque-scheduler" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Resque": "lib", + "ResqueScheduler": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dan Hunsaker", + "email": "danhunsaker+resque@gmail.com", + "role": "Maintainer" + }, + { + "name": "Rajib Ahmed", + "homepage": "https://github.com/rajibahmed", + "role": "Maintainer" + }, + { + "name": "Steve Klabnik", + "email": "steve@steveklabnik.com", + "role": "Maintainer" + }, + { + "name": "Chris Boulton", + "email": "chris@bigcommerce.com", + "role": "Creator" + } + ], + "description": "Redis backed library for creating background jobs and processing them later. Based on resque for Ruby.", + "homepage": "http://www.github.com/resque/php-resque/", + "keywords": [ + "background", + "job", + "redis", + "resque" + ], + "support": { + "issues": "https://github.com/resque/php-resque/issues", + "source": "https://github.com/resque/php-resque/tree/v1.3.6" + }, + "time": "2020-04-16T16:39:50+00:00" + }, + { + "name": "slickdeals/statsd", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/Slickdeals/statsd-php.git", + "reference": "225588a0a079e145359049f6e5e23eedb1b4c17f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Slickdeals/statsd-php/zipball/225588a0a079e145359049f6e5e23eedb1b4c17f", + "reference": "225588a0a079e145359049f6e5e23eedb1b4c17f", + "shasum": "" + }, + "require": { + "php": ">= 7.3 || ^8" + }, + "replace": { + "domnikl/statsd": "self.version" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.0", + "phpunit/phpunit": "^9", + "vimeo/psalm": "^4.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Domnikl\\Statsd\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dominik Liebler", + "email": "liebler.dominik@gmail.com" + } + ], + "description": "a PHP client for statsd", + "homepage": "https://github.com/Slickdeals/statsd-php", + "keywords": [ + "Metrics", + "monitoring", + "statistics", + "statsd", + "udp" + ], + "support": { + "issues": "https://github.com/Slickdeals/statsd-php/issues", + "source": "https://github.com/Slickdeals/statsd-php/tree/3.1.0" + }, + "time": "2021-06-04T20:33:46+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "utopia-php/abuse", + "version": "0.16.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/abuse.git", + "reference": "6370d9150425460416583feba0990504ac789e98" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/abuse/zipball/6370d9150425460416583feba0990504ac789e98", + "reference": "6370d9150425460416583feba0990504ac789e98", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-pdo": "*", + "php": ">=8.0", + "utopia-php/database": "0.28.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.4", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Abuse\\": "src/Abuse" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple abuse library to manage application usage limits", + "keywords": [ + "Abuse", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/abuse/issues", + "source": "https://github.com/utopia-php/abuse/tree/0.16.0" + }, + "time": "2022-10-31T14:46:41+00:00" + }, + { + "name": "utopia-php/analytics", + "version": "0.2.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/analytics.git", + "reference": "adfc2d057a7f6ab618a77c8a20ed3e35485ff416" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/analytics/zipball/adfc2d057a7f6ab618a77c8a20ed3e35485ff416", + "reference": "adfc2d057a7f6ab618a77c8a20ed3e35485ff416", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Analytics\\": "src/Analytics" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Torsten Dittmann", + "email": "torsten@appwrite.io" + } + ], + "description": "A simple library to track events & users.", + "keywords": [ + "analytics", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/analytics/issues", + "source": "https://github.com/utopia-php/analytics/tree/0.2.0" + }, + "time": "2021-03-23T21:33:07+00:00" + }, + { + "name": "utopia-php/audit", + "version": "0.17.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/audit.git", + "reference": "455471bd4de8d74026809e843f8c9740eb32922c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/audit/zipball/455471bd4de8d74026809e843f8c9740eb32922c", + "reference": "455471bd4de8d74026809e843f8c9740eb32922c", + "shasum": "" + }, + "require": { + "ext-pdo": "*", + "php": ">=8.0", + "utopia-php/database": "0.28.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Audit\\": "src/Audit" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A simple audit library to manage application users logs", + "keywords": [ + "Audit", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/audit/issues", + "source": "https://github.com/utopia-php/audit/tree/0.17.0" + }, + "time": "2022-10-31T14:44:52+00:00" + }, + { + "name": "utopia-php/cache", + "version": "0.8.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/cache.git", + "reference": "212e66100a1f32e674fca5d9bc317cc998303089" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/cache/zipball/212e66100a1f32e674fca5d9bc317cc998303089", + "reference": "212e66100a1f32e674fca5d9bc317cc998303089", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-memcached": "*", + "ext-redis": "*", + "php": ">=8.0" + }, + "require-dev": { + "laravel/pint": "1.2.*", + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.13.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Cache\\": "src/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A simple cache library to manage application cache storing, loading and purging", + "keywords": [ + "cache", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/cache/issues", + "source": "https://github.com/utopia-php/cache/tree/0.8.0" + }, + "time": "2022-10-16T16:48:09+00:00" + }, + { + "name": "utopia-php/cli", + "version": "0.14.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/cli.git", + "reference": "c30ef985a4e739758a0d95eb0706b357b6d8c086" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/cli/zipball/c30ef985a4e739758a0d95eb0706b357b6d8c086", + "reference": "c30ef985a4e739758a0d95eb0706b357b6d8c086", + "shasum": "" + }, + "require": { + "php": ">=7.4", + "utopia-php/framework": "0.*.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "squizlabs/php_codesniffer": "^3.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\CLI\\": "src/CLI" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple CLI library to manage command line applications", + "keywords": [ + "cli", + "command line", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/cli/issues", + "source": "https://github.com/utopia-php/cli/tree/0.14.0" + }, + "time": "2022-10-09T10:19:07+00:00" + }, + { + "name": "utopia-php/config", + "version": "0.2.2", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/config.git", + "reference": "a3d7bc0312d7150d5e04b1362dc34b2b136908cc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/config/zipball/a3d7bc0312d7150d5e04b1362dc34b2b136908cc", + "reference": "a3d7bc0312d7150d5e04b1362dc34b2b136908cc", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Config\\": "src/Config" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple Config library to managing application config variables", + "keywords": [ + "config", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/config/issues", + "source": "https://github.com/utopia-php/config/tree/0.2.2" + }, + "time": "2020-10-24T09:49:09+00:00" + }, + { + "name": "utopia-php/database", + "version": "dev-increment", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/database.git", + "reference": "ba9f0cea086fa7a8b4b613ef4afe41196fd7b4d1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/database/zipball/ba9f0cea086fa7a8b4b613ef4afe41196fd7b4d1", + "reference": "ba9f0cea086fa7a8b4b613ef4afe41196fd7b4d1", + "shasum": "" + }, + "require": { + "ext-pdo": "*", + "php": ">=8.0", + "utopia-php/cache": "0.8.*", + "utopia-php/framework": "0.*.*", + "utopia-php/mongo": "0.0.2" + }, + "require-dev": { + "ext-mongodb": "*", + "ext-redis": "*", + "fakerphp/faker": "^1.14", + "mongodb/mongodb": "1.8.0", + "phpunit/phpunit": "^9.4", + "swoole/ide-helper": "4.8.0", + "utopia-php/cli": "^0.14.0", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Database\\": "src/Database" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A simple library to manage application persistency using multiple database adapters", + "keywords": [ + "database", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/database/issues", + "source": "https://github.com/utopia-php/database/tree/increment" + }, + "time": "2023-02-02T08:34:12+00:00" + }, + { + "name": "utopia-php/domains", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/domains.git", + "reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/domains/zipball/1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73", + "reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Domains\\": "src/Domains" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "Utopia Domains library is simple and lite library for parsing web domains. This library is aiming to be as simple and easy to learn and use.", + "keywords": [ + "domains", + "framework", + "icann", + "php", + "public suffix", + "tld", + "tld extract", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/domains/issues", + "source": "https://github.com/utopia-php/domains/tree/master" + }, + "time": "2020-02-23T07:40:02+00:00" + }, + { + "name": "utopia-php/dsn", + "version": "0.1.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/dsn.git", + "reference": "17a5935eab1b89fb4b95600db50a1b6d5faa6cea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/dsn/zipball/17a5935eab1b89fb4b95600db50a1b6d5faa6cea", + "reference": "17a5935eab1b89fb4b95600db50a1b6d5faa6cea", + "shasum": "" + }, + "require": { + "php": ">=8.0" + }, + "require-dev": { + "laravel/pint": "1.2.*", + "phpunit/phpunit": "^9.3", + "squizlabs/php_codesniffer": "^3.6", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\DSN\\": "src/DSN" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A simple library for parsing and managing Data Source Names ( DSNs )", + "keywords": [ + "dsn", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/dsn/issues", + "source": "https://github.com/utopia-php/dsn/tree/0.1.0" + }, + "time": "2022-10-26T10:06:20+00:00" + }, + { + "name": "utopia-php/framework", + "version": "0.25.1", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/framework.git", + "reference": "2391b397135586b2100d39e338827bef8d2f4ad0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/2391b397135586b2100d39e338827bef8d2f4ad0", + "reference": "2391b397135586b2100d39e338827bef8d2f4ad0", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "require-dev": { + "laravel/pint": "^1.2", + "phpunit/phpunit": "^9.5.25", + "vimeo/psalm": "4.27.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A simple, light and advanced PHP framework", + "keywords": [ + "framework", + "php", + "upf" + ], + "support": { + "issues": "https://github.com/utopia-php/framework/issues", + "source": "https://github.com/utopia-php/framework/tree/0.25.1" + }, + "time": "2022-11-23T18:22:23+00:00" + }, + { + "name": "utopia-php/image", + "version": "0.5.4", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/image.git", + "reference": "ca5f436f9aa22dedaa6648f24f3687733808e336" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/image/zipball/ca5f436f9aa22dedaa6648f24f3687733808e336", + "reference": "ca5f436f9aa22dedaa6648f24f3687733808e336", + "shasum": "" + }, + "require": { + "ext-imagick": "*", + "php": ">=8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.13.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Image\\": "src/Image" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple Image manipulation library", + "keywords": [ + "framework", + "image", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/image/issues", + "source": "https://github.com/utopia-php/image/tree/0.5.4" + }, + "time": "2022-05-11T12:30:41+00:00" + }, + { + "name": "utopia-php/locale", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/locale.git", + "reference": "c2d9358d0fe2f6b6ed5448369f9d1e430c615447" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/locale/zipball/c2d9358d0fe2f6b6ed5448369f9d1e430c615447", + "reference": "c2d9358d0fe2f6b6ed5448369f9d1e430c615447", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Locale\\": "src/Locale" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple locale library to manage application translations", + "keywords": [ + "framework", + "locale", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/locale/issues", + "source": "https://github.com/utopia-php/locale/tree/0.4.0" + }, + "time": "2021-07-24T11:35:55+00:00" + }, + { + "name": "utopia-php/logger", + "version": "0.3.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/logger.git", + "reference": "079656cb5169ca9600861eda0b6819199e3d4a57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/logger/zipball/079656cb5169ca9600861eda0b6819199e3d4a57", + "reference": "079656cb5169ca9600861eda0b6819199e3d4a57", + "shasum": "" + }, + "require": { + "php": ">=8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Logger\\": "src/Logger" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Matej Bačo", + "email": "matej@appwrite.io" + }, + { + "name": "Christy Jacob", + "email": "christy@appwrite.io" + } + ], + "description": "Utopia Logger library is simple and lite library for logging information, such as errors or warnings. This library is aiming to be as simple and easy to learn and use.", + "keywords": [ + "appsignal", + "errors", + "framework", + "logger", + "logging", + "logs", + "php", + "raygun", + "sentry", + "upf", + "utopia", + "warnings" + ], + "support": { + "issues": "https://github.com/utopia-php/logger/issues", + "source": "https://github.com/utopia-php/logger/tree/0.3.0" + }, + "time": "2022-03-18T10:56:57+00:00" + }, + { + "name": "utopia-php/messaging", + "version": "0.1.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/messaging.git", + "reference": "501272fad666f06bec8f130076862e7981a73f8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/messaging/zipball/501272fad666f06bec8f130076862e7981a73f8c", + "reference": "501272fad666f06bec8f130076862e7981a73f8c", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=8.0.0" + }, + "require-dev": { + "phpmailer/phpmailer": "6.6.*", + "phpunit/phpunit": "9.5.*", + "squizlabs/php_codesniffer": "^3.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Messaging\\": "src/Utopia/Messaging" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jake Barnby", + "email": "jake@appwrite.io" + } + ], + "description": "A simple, light and advanced PHP messaging library", + "keywords": [ + "library", + "messaging", + "php", + "upf", + "utopia", + "utopia-php" + ], + "support": { + "issues": "https://github.com/utopia-php/messaging/issues", + "source": "https://github.com/utopia-php/messaging/tree/0.1.0" + }, + "time": "2022-09-29T11:22:48+00:00" + }, + { + "name": "utopia-php/mongo", + "version": "0.0.2", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/mongo.git", + "reference": "62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/mongo/zipball/62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e", + "reference": "62f9a9c0201af91b6d0dd4f0aa8a335ec9b56a1e", + "shasum": "" + }, + "require": { + "ext-mongodb": "*", + "mongodb/mongodb": "1.8.0", + "php": ">=8.0" + }, + "require-dev": { + "fakerphp/faker": "^1.14", + "laravel/pint": "1.2.*", + "phpstan/phpstan": "1.8.*", + "phpunit/phpunit": "^9.4", + "swoole/ide-helper": "4.8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Mongo\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Wess", + "email": "wess@appwrite.io" + } + ], + "description": "A simple library to manage Mongo database", + "keywords": [ + "database", + "mongo", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/mongo/issues", + "source": "https://github.com/utopia-php/mongo/tree/0.0.2" + }, + "time": "2022-11-08T11:58:46+00:00" + }, + { + "name": "utopia-php/orchestration", + "version": "0.9.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/orchestration.git", + "reference": "1d4f66684b8c4927f31b695817eae6d84aafd172" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/orchestration/zipball/1d4f66684b8c4927f31b695817eae6d84aafd172", + "reference": "1d4f66684b8c4927f31b695817eae6d84aafd172", + "shasum": "" + }, + "require": { + "php": ">=8.0", + "utopia-php/cli": "0.14.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Orchestration\\": "src/Orchestration" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Lite & fast micro PHP abstraction library for container orchestration", + "keywords": [ + "docker", + "framework", + "kubernetes", + "orchestration", + "php", + "swarm", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/orchestration/issues", + "source": "https://github.com/utopia-php/orchestration/tree/0.9.0" + }, + "time": "2022-11-09T17:38:00+00:00" + }, + { + "name": "utopia-php/platform", + "version": "0.3.1", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/platform.git", + "reference": "fe9f64420957dc8fb6201d22b499572f021411e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/platform/zipball/fe9f64420957dc8fb6201d22b499572f021411e4", + "reference": "fe9f64420957dc8fb6201d22b499572f021411e4", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-redis": "*", + "php": ">=8.0", + "utopia-php/cli": "0.14.*", + "utopia-php/framework": "0.25.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "squizlabs/php_codesniffer": "^3.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Platform\\": "src/Platform" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Light and Fast Platform Library", + "keywords": [ + "cache", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/platform/issues", + "source": "https://github.com/utopia-php/platform/tree/0.3.1" + }, + "time": "2022-11-10T07:04:24+00:00" + }, + { + "name": "utopia-php/pools", + "version": "0.4.2", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/pools.git", + "reference": "d2870ab74b31b7f4027799f082e85122154f8bed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/pools/zipball/d2870ab74b31b7f4027799f082e85122154f8bed", + "reference": "d2870ab74b31b7f4027799f082e85122154f8bed", + "shasum": "" + }, + "require": { + "php": ">=8.0" + }, + "require-dev": { + "laravel/pint": "1.2.*", + "phpstan/phpstan": "1.8.*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Pools\\": "src/Pools" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Team Appwrite", + "email": "team@appwrite.io" + } + ], + "description": "A simple library to manage connection pools", + "keywords": [ + "framework", + "php", + "pools", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/pools/issues", + "source": "https://github.com/utopia-php/pools/tree/0.4.2" + }, + "time": "2022-11-22T07:55:45+00:00" + }, + { + "name": "utopia-php/preloader", + "version": "0.2.4", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/preloader.git", + "reference": "65ef48392e72172f584b0baa2e224f9a1cebcce0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/preloader/zipball/65ef48392e72172f584b0baa2e224f9a1cebcce0", + "reference": "65ef48392e72172f584b0baa2e224f9a1cebcce0", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Preloader\\": "src/Preloader" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "team@appwrite.io" + } + ], + "description": "Utopia Preloader library is simple and lite library for managing PHP preloading configuration", + "keywords": [ + "framework", + "php", + "preload", + "preloader", + "preloading", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/preloader/issues", + "source": "https://github.com/utopia-php/preloader/tree/0.2.4" + }, + "time": "2020-10-24T07:04:59+00:00" + }, + { + "name": "utopia-php/queue", + "version": "0.5.1", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/queue.git", + "reference": "4b39e1f232b2e619b0d7fb4004f2356df334ddc1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/queue/zipball/4b39e1f232b2e619b0d7fb4004f2356df334ddc1", + "reference": "4b39e1f232b2e619b0d7fb4004f2356df334ddc1", + "shasum": "" + }, + "require": { + "php": ">=8.0", + "utopia-php/cli": "0.14.*", + "utopia-php/framework": "0.*.*" + }, + "require-dev": { + "laravel/pint": "^0.2.3", + "phpstan/phpstan": "^1.8", + "phpunit/phpunit": "^9.5.5", + "swoole/ide-helper": "4.8.8", + "workerman/workerman": "^4.0" + }, + "suggest": { + "ext-swoole": "Needed to support Swoole.", + "workerman/workerman": "Needed to support Workerman." + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Queue\\": "src/Queue" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Torsten Dittmann", + "email": "torsten@appwrite.io" + } + ], + "description": "A powerful task queue.", + "keywords": [ + "Tasks", + "framework", + "php", + "queue", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/queue/issues", + "source": "https://github.com/utopia-php/queue/tree/0.5.1" + }, + "time": "2022-11-16T19:47:26+00:00" + }, + { + "name": "utopia-php/registry", + "version": "0.5.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/registry.git", + "reference": "bedc4ed54527b2803e6dfdccc39449f98522b70d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/registry/zipball/bedc4ed54527b2803e6dfdccc39449f98522b70d", + "reference": "bedc4ed54527b2803e6dfdccc39449f98522b70d", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Registry\\": "src/Registry" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple dependency management library for PHP", + "keywords": [ + "dependency management", + "di", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/registry/issues", + "source": "https://github.com/utopia-php/registry/tree/0.5.0" + }, + "time": "2021-03-10T10:45:22+00:00" + }, + { + "name": "utopia-php/storage", + "version": "0.13.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/storage.git", + "reference": "f34c010e4f8394a6b4aff70b6de55041d9a145d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/storage/zipball/f34c010e4f8394a6b4aff70b6de55041d9a145d3", + "reference": "f34c010e4f8394a6b4aff70b6de55041d9a145d3", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "ext-zlib": "*", + "ext-zstd": "*", + "php": ">=8.0", + "utopia-php/framework": "0.*.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Storage\\": "src/Storage" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple Storage library to manage application storage", + "keywords": [ + "framework", + "php", + "storage", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/storage/issues", + "source": "https://github.com/utopia-php/storage/tree/0.13.0" + }, + "time": "2022-11-17T15:10:18+00:00" + }, + { + "name": "utopia-php/swoole", + "version": "0.5.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/swoole.git", + "reference": "c2a3a4f944a2f22945af3cbcb95b13f0769628b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/swoole/zipball/c2a3a4f944a2f22945af3cbcb95b13f0769628b1", + "reference": "c2a3a4f944a2f22945af3cbcb95b13f0769628b1", + "shasum": "" + }, + "require": { + "ext-swoole": "*", + "php": ">=8.0", + "utopia-php/framework": "0.*.*" + }, + "require-dev": { + "laravel/pint": "1.2.*", + "phpunit/phpunit": "^9.3", + "swoole/ide-helper": "4.8.3", + "vimeo/psalm": "4.15.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Swoole\\": "src/Swoole" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "An extension for Utopia Framework to work with PHP Swoole as a PHP FPM alternative", + "keywords": [ + "framework", + "http", + "php", + "server", + "swoole", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/swoole/issues", + "source": "https://github.com/utopia-php/swoole/tree/0.5.0" + }, + "time": "2022-10-19T22:19:07+00:00" + }, + { + "name": "utopia-php/system", + "version": "0.6.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/system.git", + "reference": "289c4327713deadc9c748b5317d248133a02f245" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/system/zipball/289c4327713deadc9c748b5317d248133a02f245", + "reference": "289c4327713deadc9c748b5317d248133a02f245", + "shasum": "" + }, + "require": { + "laravel/pint": "1.2.*", + "php": ">=7.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "squizlabs/php_codesniffer": "^3.6", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\System\\": "src/System" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Torsten Dittmann", + "email": "torsten@appwrite.io" + } + ], + "description": "A simple library for obtaining information about the host's system.", + "keywords": [ + "framework", + "php", + "system", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/system/issues", + "source": "https://github.com/utopia-php/system/tree/0.6.0" + }, + "time": "2022-11-07T13:51:59+00:00" + }, + { + "name": "utopia-php/websocket", + "version": "0.1.0", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/websocket.git", + "reference": "51fcb86171400d8aa40d76c54593481fd273dab5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/websocket/zipball/51fcb86171400d8aa40d76c54593481fd273dab5", + "reference": "51fcb86171400d8aa40d76c54593481fd273dab5", + "shasum": "" + }, + "require": { + "php": ">=8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5.5", + "swoole/ide-helper": "4.6.6", + "textalk/websocket": "1.5.2", + "vimeo/psalm": "^4.8.1", + "workerman/workerman": "^4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\WebSocket\\": "src/WebSocket" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Torsten Dittmann", + "email": "torsten@appwrite.io" + } + ], + "description": "A simple abstraction for WebSocket servers.", + "keywords": [ + "framework", + "php", + "upf", + "utopia", + "websocket" + ], + "support": { + "issues": "https://github.com/utopia-php/websocket/issues", + "source": "https://github.com/utopia-php/websocket/tree/0.1.0" + }, + "time": "2021-12-20T10:50:09+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" + } + ], + "packages-dev": [ + { + "name": "appwrite/sdk-generator", + "version": "0.28.1", + "source": { + "type": "git", + "url": "https://github.com/appwrite/sdk-generator.git", + "reference": "ed8d3daa66589733b49b11c053d524cdf576ffee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ed8d3daa66589733b49b11c053d524cdf576ffee", + "reference": "ed8d3daa66589733b49b11c053d524cdf576ffee", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "matthiasmullie/minify": "^1.3.68", + "php": ">=7.0.0", + "twig/twig": "^3.4.1" + }, + "require-dev": { + "brianium/paratest": "^6.4", + "phpunit/phpunit": "^9.5.21" + }, + "type": "library", + "autoload": { + "psr-4": { + "Appwrite\\SDK\\": "src/SDK", + "Appwrite\\Spec\\": "src/Spec" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "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.28.1" + }, + "time": "2022-09-22T09:15:54+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:15:36+00:00" + }, + { + "name": "matthiasmullie/minify", + "version": "1.3.70", + "source": { + "type": "git", + "url": "https://github.com/matthiasmullie/minify.git", + "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/2807d9f9bece6877577ad44acb5c801bb3ae536b", + "reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "matthiasmullie/path-converter": "~1.1", + "php": ">=5.3.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": ">=2.0", + "matthiasmullie/scrapbook": ">=1.3", + "phpunit/phpunit": ">=4.8", + "squizlabs/php_codesniffer": ">=3.0" + }, + "suggest": { + "psr/cache-implementation": "Cache implementation to use with Minify::cache" + }, + "bin": [ + "bin/minifycss", + "bin/minifyjs" + ], + "type": "library", + "autoload": { + "psr-4": { + "MatthiasMullie\\Minify\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthias Mullie", + "email": "minify@mullie.eu", + "homepage": "https://www.mullie.eu", + "role": "Developer" + } + ], + "description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.", + "homepage": "https://github.com/matthiasmullie/minify", + "keywords": [ + "JS", + "css", + "javascript", + "minifier", + "minify" + ], + "support": { + "issues": "https://github.com/matthiasmullie/minify/issues", + "source": "https://github.com/matthiasmullie/minify/tree/1.3.70" + }, + "funding": [ + { + "url": "https://github.com/matthiasmullie", + "type": "github" + } + ], + "time": "2022-12-09T12:56:44+00:00" + }, + { + "name": "matthiasmullie/path-converter", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/matthiasmullie/path-converter.git", + "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/matthiasmullie/path-converter/zipball/e7d13b2c7e2f2268e1424aaed02085518afa02d9", + "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "MatthiasMullie\\PathConverter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthias Mullie", + "email": "pathconverter@mullie.eu", + "homepage": "http://www.mullie.eu", + "role": "Developer" + } + ], + "description": "Relative path converter", + "homepage": "http://github.com/matthiasmullie/path-converter", + "keywords": [ + "converter", + "path", + "paths", + "relative" + ], + "support": { + "issues": "https://github.com/matthiasmullie/path-converter/issues", + "source": "https://github.com/matthiasmullie/path-converter/tree/1.1.3" + }, + "time": "2019-02-05T23:41:09+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2022-03-03T13:19:32+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.15.3", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039", + "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3" + }, + "time": "2023-01-16T22:05:37+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + }, + "time": "2021-10-19T17:43:47+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.6.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "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.2" + }, + "time": "2022-10-14T12:47:21+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.16.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be8cac52a0827776ff9ccda8c381ac5b71aeb359", + "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0 || ^7.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/v1.16.0" + }, + "time": "2022-11-29T15:06:56+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.24", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed", + "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.14", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "*", + "ext-xdebug": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-01-26T08:26:55+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.5.20", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba", + "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^3.0", + "sebastian/version": "^3.0.2" + }, + "require-dev": { + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.5-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-04-01T12:37:26+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:41:17+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-04-03T09:37:03+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T06:03:37+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-02-14T08:28:10+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-12T14:47:03+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.7.1", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2022-06-18T07:21:10+00:00" + }, + { + "name": "swoole/ide-helper", + "version": "4.8.9", + "source": { + "type": "git", + "url": "https://github.com/swoole/ide-helper.git", + "reference": "8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swoole/ide-helper/zipball/8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe", + "reference": "8f82ba3b6af04a5bccb97c1654af992d1ee8b0fe", + "shasum": "" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Team Swoole", + "email": "team@swoole.com" + } + ], + "description": "IDE help files for Swoole.", + "support": { + "issues": "https://github.com/swoole/ide-helper/issues", + "source": "https://github.com/swoole/ide-helper/tree/4.8.9" + }, + "funding": [ + { + "url": "https://gitee.com/swoole/swoole?donate=true", + "type": "custom" + }, + { + "url": "https://github.com/swoole", + "type": "github" + } + ], + "time": "2022-04-18T20:38:04+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "textalk/websocket", + "version": "1.5.7", + "source": { + "type": "git", + "url": "https://github.com/Textalk/websocket-php.git", + "reference": "1712325e99b6bf869ccbf9bf41ab749e7328ea46" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Textalk/websocket-php/zipball/1712325e99b6bf869ccbf9bf41ab749e7328ea46", + "reference": "1712325e99b6bf869ccbf9bf41ab749e7328ea46", + "shasum": "" + }, + "require": { + "php": "^7.2 | ^8.0", + "psr/log": "^1 | ^2 | ^3" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.0", + "phpunit/phpunit": "^8.0|^9.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "WebSocket\\": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Fredrik Liljegren" + }, + { + "name": "Sören Jensen", + "email": "soren@abicart.se" + } + ], + "description": "WebSocket client and server", + "support": { + "issues": "https://github.com/Textalk/websocket-php/issues", + "source": "https://github.com/Textalk/websocket-php/tree/1.5.7" + }, + "time": "2022-03-29T09:46:59+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + }, + { + "name": "twig/twig", + "version": "v3.5.0", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/3ffcf4b7d890770466da3b2666f82ac054e7ec72", + "reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-mbstring": "^1.3" + }, + "require-dev": { + "psr/container": "^1.0", + "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.5-dev" + } + }, + "autoload": { + "psr-4": { + "Twig\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Twig Team", + "role": "Contributors" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "https://twig.symfony.com", + "keywords": [ + "templating" + ], + "support": { + "issues": "https://github.com/twigphp/Twig/issues", + "source": "https://github.com/twigphp/Twig/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2022-12-27T12:28:18+00:00" + } + ], + "aliases": [ + { + "package": "utopia-php/database", + "version": "dev-increment", + "alias": "0.28.0", + "alias_normalized": "0.28.0.0" + } + ], + "minimum-stability": "stable", + "stability-flags": { + "utopia-php/database": 20 + }, + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=8.0.0", + "ext-curl": "*", + "ext-imagick": "*", + "ext-mbstring": "*", + "ext-json": "*", + "ext-yaml": "*", + "ext-dom": "*", + "ext-redis": "*", + "ext-swoole": "*", + "ext-pdo": "*", + "ext-openssl": "*", + "ext-zlib": "*", + "ext-sockets": "*" + }, + "platform-dev": { + "ext-fileinfo": "*" + }, + "platform-overrides": { + "php": "8.0" + }, + "plugin-api-version": "2.2.0" +} From a30dfd284cb1a7f9e54d164f85032121712ae74b Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 2 Feb 2023 18:36:32 +0200 Subject: [PATCH 71/94] addressing comments --- app/config/collections.php | 44 +++++++++++++++++----------------- app/controllers/shared/api.php | 42 ++++++++++++++++---------------- app/init.php | 23 +++++++++++++++++- 3 files changed, 66 insertions(+), 43 deletions(-) diff --git a/app/config/collections.php b/app/config/collections.php index 2ba8c6717..87a68177b 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -192,7 +192,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -214,7 +214,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -369,7 +369,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -391,7 +391,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -496,7 +496,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -791,7 +791,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -892,7 +892,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -986,7 +986,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -1091,7 +1091,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -1203,7 +1203,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -1579,7 +1579,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -1673,7 +1673,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -2014,7 +2014,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -2036,7 +2036,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -2240,7 +2240,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -2284,7 +2284,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -2409,7 +2409,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -2442,7 +2442,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -2633,7 +2633,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -2760,7 +2760,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -2782,7 +2782,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -3669,7 +3669,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 54f347f4a..bb7d727fe 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -61,11 +61,11 @@ $databaseListener = function (string $event, Document $document, Document $proje switch (true) { case $document->getCollection() === 'teams': $queueForUsage - ->addMetric("teams", $value); // per project + ->addMetric(METRIC_TEAMS, $value); // per project break; case $document->getCollection() === 'users': $queueForUsage - ->addMetric("users", $value); // per project + ->addMetric(METRIC_USERS, $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { $queueForUsage ->addReduce($document); @@ -73,11 +73,11 @@ $databaseListener = function (string $event, Document $document, Document $proje break; case $document->getCollection() === 'sessions': // sessions $queueForUsage - ->addMetric("sessions", $value); //per project + ->addMetric(METRIC_SESSIONS, $value); //per project break; case $document->getCollection() === 'databases': // databases $queueForUsage - ->addMetric("databases", $value); // per project + ->addMetric(METRIC_DATABASES, $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { $queueForUsage @@ -88,8 +88,8 @@ $databaseListener = function (string $event, Document $document, Document $proje $parts = explode('_', $document->getCollection()); $databaseId = $parts[1] ?? 0; $queueForUsage - ->addMetric("collections", $value) // per project - ->addMetric("{$databaseId}" . ".collections", $value) // per database + ->addMetric(METRIC_COLLECTIONS, $value) // per project + ->addMetric(str_replace('databaseId', $databaseId, METRIC_DATABASE_ID_COLLECTIONS), $value) // per database ; if ($event === Database::EVENT_DOCUMENT_DELETE) { @@ -102,13 +102,13 @@ $databaseListener = function (string $event, Document $document, Document $proje $databaseId = $parts[1] ?? 0; $collectionId = $parts[3] ?? 0; $queueForUsage - ->addMetric("documents", $value) // per project - ->addMetric("{$databaseId}" . ".documents", $value) // per database - ->addMetric("{$databaseId}" . "." . "{$collectionId}" . ".documents", $value); // per collection + ->addMetric(METRIC_DOCUMENTS, $value) // per project + ->addMetric(str_replace('databaseId', $databaseId, METRIC_DATABASE_ID_DOCUMENTS), $value) // per database + ->addMetric(str_replace(['databaseId', 'collectionId'], [$databaseId, $collectionId], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), $value); // per collection break; case $document->getCollection() === 'buckets': //buckets $queueForUsage - ->addMetric("buckets", $value); // per project + ->addMetric(METRIC_BUCKETS, $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { $queueForUsage ->addReduce($document); @@ -118,14 +118,14 @@ $databaseListener = function (string $event, Document $document, Document $proje $parts = explode('_', $document->getCollection()); $bucketId = $parts[1]; $queueForUsage - ->addMetric("files", $value) // per project - ->addMetric("files.storage", $document->getAttribute('sizeOriginal') * $value) // per project - ->addMetric("{$bucketId}" . ".files", $value) // per bucket - ->addMetric("{$bucketId}" . ".files.storage", $document->getAttribute('sizeOriginal') * $value);// per bucket + ->addMetric(METRIC_FILES, $value) // per project + ->addMetric(METRIC_FILES_STORAGE, $document->getAttribute('sizeOriginal') * $value) // per project + ->addMetric(str_replace('bucketId', $bucketId, METRIC_BUCKET_ID_FILES), $value) // per bucket + ->addMetric(str_replace('bucketId', $bucketId, METRIC_BUCKET_ID_FILES_STORAGE), $document->getAttribute('sizeOriginal') * $value); // per bucket break; case $document->getCollection() === 'functions': $queueForUsage - ->addMetric('functions', $value); // per project + ->addMetric(METRIC_FUNCTIONS, $value); // per project if ($event === Database::EVENT_DOCUMENT_DELETE) { $queueForUsage @@ -134,15 +134,17 @@ $databaseListener = function (string $event, Document $document, Document $proje break; case $document->getCollection() === 'deployments': $queueForUsage - ->addMetric("deployments", $value) // per project + ->addMetric(METRIC_DEPLOYMENTS, $value) // per project ->addMetric("deployments.storage", $document->getAttribute('size') * $value) // per project - ->addMetric("{$document->getAttribute('resourceType')}" . "." . "{$document->getAttribute('resourceInternalId')}" . ".deployments", $value)// per function - ->addMetric("{$document->getAttribute('resourceType')}" . "." . "{$document->getAttribute('resourceInternalId')}" . ".deployments.storage", $document->getAttribute('size') * $value); // per function + ->addMetric(METRIC_DEPLOYMENTS_STORAGE, $document->getAttribute('size') * $value) // per project + ->addMetric(str_replace(['resourceType', 'resourceInternalId'], [$document->getAttribute('resourceType'), $document->getAttribute('resourceInternalId')], METRIC_FUNCTION_ID_DEPLOYMENTS), $value)// per function + ->addMetric(str_replace(['resourceType', 'resourceInternalId'], [$document->getAttribute('resourceType'), $document->getAttribute('resourceInternalId')], METRIC_FUNCTION_ID_STORAGE), $document->getAttribute('size') * $value);// per function + break; case $document->getCollection() === 'executions': $queueForUsage - ->addMetric("executions", $value) // per project - ->addMetric("{$document->getAttribute('functionInternalId')}" . ".executions", $value); // per function + ->addMetric(METRIC_EXECUTIONS, $value) // per project + ->addMetric(str_replace('functionInternalId', $document->getAttribute('functionInternalId'), METRIC_FUNCTION_ID_EXECUTIONS), $value);// per function break; default: break; diff --git a/app/init.php b/app/init.php index 3ec27d00e..5a8acc630 100644 --- a/app/init.php +++ b/app/init.php @@ -174,7 +174,28 @@ const APP_AUTH_TYPE_KEY = 'Key'; const APP_AUTH_TYPE_ADMIN = 'Admin'; // Response related const MAX_OUTPUT_CHUNK_SIZE = 2 * 1024 * 1024; // 2MB - +// usage metrics +const METRIC_TEAMS = 'teams'; +const METRIC_USERS = 'users'; +const METRIC_SESSIONS = 'sessions'; +const METRIC_DATABASES = 'databases'; +const METRIC_COLLECTIONS = 'collections'; +const METRIC_DATABASE_ID_COLLECTIONS = '{databaseId}.collections'; +const METRIC_DOCUMENTS = 'documents'; +const METRIC_DATABASE_ID_DOCUMENTS = '{databaseId}.documents'; +const METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS = '{databaseId}.{collectionId}.documents'; +const METRIC_BUCKETS = 'buckets'; +const METRIC_FILES = 'files'; +const METRIC_FILES_STORAGE = 'files.storage'; +const METRIC_BUCKET_ID_FILES = '{bucketId}.files'; +const METRIC_BUCKET_ID_FILES_STORAGE = '{bucketId}.files.storage'; +const METRIC_FUNCTIONS = 'functions'; +const METRIC_DEPLOYMENTS = 'deployments'; +const METRIC_DEPLOYMENTS_STORAGE = 'deployments.storage'; +const METRIC_FUNCTION_ID_DEPLOYMENTS = '{resourceType}.{resourceInternalId}.deployments'; +const METRIC_FUNCTION_ID_STORAGE = '{resourceType}.{resourceInternalId}.deployments.storage'; +const METRIC_EXECUTIONS = 'executions'; +const METRIC_FUNCTION_ID_EXECUTIONS = '{functionInternalId}.executions'; $register = new Registry(); From 1ac935077b24dda4f558b375e9e4d6ac8ef5420c Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 2 Feb 2023 20:16:01 +0200 Subject: [PATCH 72/94] addressing comments --- app/controllers/api/databases.php | 13 ++-- app/controllers/api/functions.php | 52 ++++++------- app/controllers/shared/api.php | 19 +++-- app/init.php | 10 ++- app/workers/builds.php | 12 +-- app/workers/functions.php | 8 +- docker-compose.yml | 75 +++++++++---------- src/Appwrite/Platform/Tasks/Doctor.php | 25 ------- .../Utopia/Response/Model/UsageFunction.php | 10 +-- .../Utopia/Response/Model/UsageFunctions.php | 12 +-- 10 files changed, 108 insertions(+), 128 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index b9628a53d..7fbcbcf21 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -2404,9 +2404,9 @@ App::get('/v1/databases/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - 'databases', - 'collections', - 'documents', + METRIC_DATABASES, + METRIC_COLLECTIONS, + METRIC_DOCUMENTS, ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { @@ -2479,8 +2479,8 @@ App::get('/v1/databases/:databaseId/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - $database->getInternalId() . '.collections', - $database->getInternalId() . '.documents', + str_replace('{databaseId}', $database->getInternalId(), METRIC_DATABASE_ID_COLLECTIONS), + str_replace('{databaseId}', $database->getInternalId(), METRIC_DATABASE_ID_DOCUMENTS), ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { @@ -2546,7 +2546,6 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage') ->action(function (string $databaseId, string $range, string $collectionId, Response $response, Database $dbForProject) { $database = $dbForProject->getDocument('databases', $databaseId); - $collectionDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collectionDocument->getInternalId()); @@ -2558,7 +2557,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - $collectionDocument->getInternalId() . '.documents', + str_replace(['{databaseId}', '{collectionId}'], [$database->getInternalId(), $collectionDocument->getInternalId()], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 2d77a12b7..67c803a70 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -236,13 +236,13 @@ App::get('/v1/functions/:functionId/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - 'functions.' . $function->getInternalId() . '.deployments', - 'functions.' . $function->getInternalId() . '.deployments.storage', - $function->getInternalId() . '.builds', - $function->getInternalId() . '.builds.storage', - $function->getInternalId() . '.builds.compute', - $function->getInternalId() . '.executions', - $function->getInternalId() . '.executions.compute', + str_replace(['{resourceType}', '{resourceInternalId}'], ['functions', $function->getInternalId()], METRIC_FUNCTION_ID_DEPLOYMENTS), + str_replace(['{resourceType}', '{resourceInternalId}'], $function->getInternalId(), METRIC_FUNCTION_ID_STORAGE), + str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS), + str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_STORAGE), + str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_COMPUTE), + str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS), + str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE), ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { @@ -284,13 +284,13 @@ App::get('/v1/functions/:functionId/usage') $response->dynamic(new Document([ 'range' => $range, - 'deployments' => $usage[$metrics[0]], + 'deploymentsTotal' => $usage[$metrics[0]], 'deploymentsStorage' => $usage[$metrics[1]], - 'builds' => $usage[$metrics[2]], + 'buildsTotal' => $usage[$metrics[2]], 'buildsStorage' => $usage[$metrics[3]], - 'buildsCompute' => $usage[$metrics[4]], - 'executions' => $usage[$metrics[5]], - 'executionsCompute' => $usage[$metrics[6]], + 'buildsTime' => $usage[$metrics[4]], + 'executionsTotal' => $usage[$metrics[5]], + 'executionsTime' => $usage[$metrics[6]], ]), Response::MODEL_USAGE_FUNCTION); }); @@ -313,14 +313,14 @@ App::get('/v1/functions/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - 'functions', - 'deployments', - 'deployments.storage', - 'builds', - 'builds.storage', - 'builds.compute', - 'executions', - 'executions.compute', + METRIC_FUNCTIONS, + METRIC_DEPLOYMENTS, + METRIC_DEPLOYMENTS_STORAGE, + METRIC_BUILDS, + METRIC_BUILDS_STORAGE, + METRIC_BUILDS_COMPUTE, + METRIC_EXECUTIONS, + METRIC_EXECUTIONS_COMPUTE, ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { @@ -361,14 +361,14 @@ App::get('/v1/functions/usage') } $response->dynamic(new Document([ 'range' => $range, - 'functions' => $usage[$metrics[0]], - 'deployments' => $usage[$metrics[1]], + 'functionsTotal' => $usage[$metrics[0]], + 'deploymentsTotal' => $usage[$metrics[1]], 'deploymentsStorage' => $usage[$metrics[2]], - 'builds' => $usage[$metrics[3]], + 'buildsTotal' => $usage[$metrics[3]], 'buildsStorage' => $usage[$metrics[4]], - 'buildsCompute' => $usage[$metrics[5]], - 'executions' => $usage[$metrics[6]], - 'executionsCompute' => $usage[$metrics[7]], + 'buildsTime' => $usage[$metrics[5]], + 'executionsTotal' => $usage[$metrics[6]], + 'executionsTime' => $usage[$metrics[7]], ]), Response::MODEL_USAGE_FUNCTIONS); }); diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index bb7d727fe..8f68e4809 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -89,7 +89,7 @@ $databaseListener = function (string $event, Document $document, Document $proje $databaseId = $parts[1] ?? 0; $queueForUsage ->addMetric(METRIC_COLLECTIONS, $value) // per project - ->addMetric(str_replace('databaseId', $databaseId, METRIC_DATABASE_ID_COLLECTIONS), $value) // per database + ->addMetric(str_replace('{databaseId}', $databaseId, METRIC_DATABASE_ID_COLLECTIONS), $value) // per database ; if ($event === Database::EVENT_DOCUMENT_DELETE) { @@ -103,8 +103,8 @@ $databaseListener = function (string $event, Document $document, Document $proje $collectionId = $parts[3] ?? 0; $queueForUsage ->addMetric(METRIC_DOCUMENTS, $value) // per project - ->addMetric(str_replace('databaseId', $databaseId, METRIC_DATABASE_ID_DOCUMENTS), $value) // per database - ->addMetric(str_replace(['databaseId', 'collectionId'], [$databaseId, $collectionId], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), $value); // per collection + ->addMetric(str_replace('{databaseId}', $databaseId, METRIC_DATABASE_ID_DOCUMENTS), $value) // per database + ->addMetric(str_replace(['{databaseId}', '{collectionId}'], [$databaseId, $collectionId], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), $value); // per collection break; case $document->getCollection() === 'buckets': //buckets $queueForUsage @@ -116,12 +116,12 @@ $databaseListener = function (string $event, Document $document, Document $proje break; case str_starts_with($document->getCollection(), 'bucket_'): // files $parts = explode('_', $document->getCollection()); - $bucketId = $parts[1]; + $bucketId = $parts[1]; $queueForUsage ->addMetric(METRIC_FILES, $value) // per project ->addMetric(METRIC_FILES_STORAGE, $document->getAttribute('sizeOriginal') * $value) // per project - ->addMetric(str_replace('bucketId', $bucketId, METRIC_BUCKET_ID_FILES), $value) // per bucket - ->addMetric(str_replace('bucketId', $bucketId, METRIC_BUCKET_ID_FILES_STORAGE), $document->getAttribute('sizeOriginal') * $value); // per bucket + ->addMetric(str_replace('{bucketId}', $bucketId, METRIC_BUCKET_ID_FILES), $value) // per bucket + ->addMetric(str_replace('{bucketId}', $bucketId, METRIC_BUCKET_ID_FILES_STORAGE), $document->getAttribute('sizeOriginal') * $value); // per bucket break; case $document->getCollection() === 'functions': $queueForUsage @@ -135,16 +135,15 @@ $databaseListener = function (string $event, Document $document, Document $proje case $document->getCollection() === 'deployments': $queueForUsage ->addMetric(METRIC_DEPLOYMENTS, $value) // per project - ->addMetric("deployments.storage", $document->getAttribute('size') * $value) // per project ->addMetric(METRIC_DEPLOYMENTS_STORAGE, $document->getAttribute('size') * $value) // per project - ->addMetric(str_replace(['resourceType', 'resourceInternalId'], [$document->getAttribute('resourceType'), $document->getAttribute('resourceInternalId')], METRIC_FUNCTION_ID_DEPLOYMENTS), $value)// per function - ->addMetric(str_replace(['resourceType', 'resourceInternalId'], [$document->getAttribute('resourceType'), $document->getAttribute('resourceInternalId')], METRIC_FUNCTION_ID_STORAGE), $document->getAttribute('size') * $value);// per function + ->addMetric(str_replace(['{resourceType}', '{resourceInternalId}'], [$document->getAttribute('resourceType'), $document->getAttribute('resourceInternalId')], METRIC_FUNCTION_ID_DEPLOYMENTS), $value)// per function + ->addMetric(str_replace(['{resourceType}', '{resourceInternalId}'], [$document->getAttribute('resourceType'), $document->getAttribute('resourceInternalId')], METRIC_FUNCTION_ID_STORAGE), $document->getAttribute('size') * $value);// per function break; case $document->getCollection() === 'executions': $queueForUsage ->addMetric(METRIC_EXECUTIONS, $value) // per project - ->addMetric(str_replace('functionInternalId', $document->getAttribute('functionInternalId'), METRIC_FUNCTION_ID_EXECUTIONS), $value);// per function + ->addMetric(str_replace('{functionInternalId}', $document->getAttribute('functionInternalId'), METRIC_FUNCTION_ID_EXECUTIONS), $value);// per function break; default: break; diff --git a/app/init.php b/app/init.php index 5a8acc630..3d7484541 100644 --- a/app/init.php +++ b/app/init.php @@ -174,7 +174,7 @@ const APP_AUTH_TYPE_KEY = 'Key'; const APP_AUTH_TYPE_ADMIN = 'Admin'; // Response related const MAX_OUTPUT_CHUNK_SIZE = 2 * 1024 * 1024; // 2MB -// usage metrics +// Usage metrics const METRIC_TEAMS = 'teams'; const METRIC_USERS = 'users'; const METRIC_SESSIONS = 'sessions'; @@ -192,10 +192,18 @@ const METRIC_BUCKET_ID_FILES_STORAGE = '{bucketId}.files.storage'; const METRIC_FUNCTIONS = 'functions'; const METRIC_DEPLOYMENTS = 'deployments'; const METRIC_DEPLOYMENTS_STORAGE = 'deployments.storage'; +const METRIC_BUILDS = 'builds'; +const METRIC_BUILDS_STORAGE = 'builds.storage'; +const METRIC_BUILDS_COMPUTE = 'builds.compute'; +const METRIC_FUNCTION_ID_BUILDS = '{functionInternalId}.builds'; +const METRIC_FUNCTION_ID_BUILDS_STORAGE = '{functionInternalId}.builds.storage'; +const METRIC_FUNCTION_ID_BUILDS_COMPUTE = '{functionInternalId}.builds.compute'; const METRIC_FUNCTION_ID_DEPLOYMENTS = '{resourceType}.{resourceInternalId}.deployments'; const METRIC_FUNCTION_ID_STORAGE = '{resourceType}.{resourceInternalId}.deployments.storage'; const METRIC_EXECUTIONS = 'executions'; +const METRIC_EXECUTIONS_COMPUTE = 'executions.compute'; const METRIC_FUNCTION_ID_EXECUTIONS = '{functionInternalId}.executions'; +const METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE = '{functionInternalId}.executions.compute'; $register = new Registry(); diff --git a/app/workers/builds.php b/app/workers/builds.php index 36d9d96bc..bfcb29770 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -254,12 +254,12 @@ class BuildsV1 extends Worker $this ->getUsageQueue() ->setProject($project) - ->addMetric("builds", 1) // per project - ->addMetric("builds.storage", $build->getAttribute('size', 0)) - ->addMetric("builds.compute", $build->getAttribute('duration', 0)) - ->addMetric("{$function->getInternalId()}" . ".builds", 1) // per function - ->addMetric("{$function->getInternalId()}" . ".builds.storage", $build->getAttribute('size', 0)) - ->addMetric("{$function->getInternalId()}" . ".builds.compute", $build->getAttribute('duration', 0)) + ->addMetric(METRIC_BUILDS, 1) // per project + ->addMetric(METRIC_BUILDS_STORAGE, $build->getAttribute('size', 0)) + ->addMetric(METRIC_BUILDS_COMPUTE, $build->getAttribute('duration', 0)) + ->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS), 1) // per function + ->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_STORAGE), $build->getAttribute('size', 0)) + ->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_COMPUTE), $build->getAttribute('duration', 0)) ->trigger() ; } diff --git a/app/workers/functions.php b/app/workers/functions.php index aa869ec3c..e649fed2f 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -103,8 +103,8 @@ Server::setResource('execute', function () { */ $queueForUsage - ->addMetric('executions', 1) // per project - ->addMetric("{$function->getId()}" . ".executions", 1); // per function + ->addMetric(METRIC_EXECUTIONS, 1) // per project + ->addMetric(str_replace('{functionInternalId}', $function->getId(), METRIC_FUNCTION_ID_EXECUTIONS), 1); // per function } $execution->setAttribute('status', 'processing'); @@ -214,8 +214,8 @@ Server::setResource('execute', function () { /** Trigger usage queue */ $queueForUsage ->setProject($project) - ->addMetric('executions.compute', (int)($execution->getAttribute('duration') * 1000))// per project - ->addMetric("{$function->getInternalId()}" . ".executions.compute", (int)($execution->getAttribute('duration') * 1000))// per function + ->addMetric(METRIC_EXECUTIONS_COMPUTE, (int)($execution->getAttribute('duration') * 1000))// per project + ->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE), (int)($execution->getAttribute('duration') * 1000)) ->trigger() ; }; diff --git a/docker-compose.yml b/docker-compose.yml index 8eb50fcc2..d1025c822 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -85,6 +85,7 @@ services: - ./public:/usr/src/code/public - ./src:/usr/src/code/src - ./dev:/usr/local/dev + depends_on: - mariadb - redis @@ -333,7 +334,6 @@ services: volumes: - ./app:/usr/src/code/app - ./src:/usr/src/code/src - #- ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database depends_on: - redis - mariadb @@ -539,43 +539,6 @@ services: - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG - appwrite-worker-usage: - entrypoint: worker-usage - <<: *x-logging - container_name: appwrite-worker-usage - image: appwrite-dev - networks: - - appwrite - volumes: - - ./app:/usr/src/code/app - - ./src:/usr/src/code/src - #- ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database - depends_on: - - redis - - mariadb - environment: - - _APP_ENV - - _APP_WORKER_PER_CORE - - _APP_CONNECTIONS_MAX - - _APP_POOL_CLIENTS - - _APP_OPENSSL_KEY_V1 - - _APP_DB_HOST - - _APP_DB_PORT - - _APP_DB_SCHEMA - - _APP_DB_USER - - _APP_DB_PASS - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_REDIS_USER - - _APP_REDIS_PASS - - _APP_CONNECTIONS_DB_CONSOLE - - _APP_CONNECTIONS_DB_PROJECT - - _APP_CONNECTIONS_CACHE - - _APP_CONNECTIONS_QUEUE - - _APP_USAGE_STATS - - DOCKERHUB_PULL_USERNAME - - DOCKERHUB_PULL_PASSWORD - appwrite-maintenance: entrypoint: maintenance <<: *x-logging @@ -613,6 +576,42 @@ services: - _APP_MAINTENANCE_RETENTION_AUDIT - _APP_MAINTENANCE_RETENTION_SCHEDULES + appwrite-worker-usage: + entrypoint: worker-usage + <<: *x-logging + container_name: appwrite-worker-usage + image: appwrite-dev + networks: + - appwrite + volumes: + - ./app:/usr/src/code/app + - ./src:/usr/src/code/src + depends_on: + - redis + - mariadb + environment: + - _APP_ENV + - _APP_WORKER_PER_CORE + - _APP_CONNECTIONS_MAX + - _APP_POOL_CLIENTS + - _APP_OPENSSL_KEY_V1 + - _APP_DB_HOST + - _APP_DB_PORT + - _APP_DB_SCHEMA + - _APP_DB_USER + - _APP_DB_PASS + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS + - _APP_CONNECTIONS_DB_CONSOLE + - _APP_CONNECTIONS_DB_PROJECT + - _APP_CONNECTIONS_CACHE + - _APP_CONNECTIONS_QUEUE + - _APP_USAGE_STATS + - DOCKERHUB_PULL_USERNAME + - DOCKERHUB_PULL_PASSWORD + appwrite-schedule: entrypoint: schedule <<: *x-logging diff --git a/src/Appwrite/Platform/Tasks/Doctor.php b/src/Appwrite/Platform/Tasks/Doctor.php index aafd8f83a..9a6d6a284 100644 --- a/src/Appwrite/Platform/Tasks/Doctor.php +++ b/src/Appwrite/Platform/Tasks/Doctor.php @@ -2,20 +2,16 @@ namespace Appwrite\Platform\Tasks; -use Appwrite\URL\URL; use Utopia\App; use Utopia\CLI\Console; use Appwrite\ClamAV\Network; use Utopia\Logger\Logger; -use Utopia\Queue\Client; use Utopia\Storage\Device\Local; use Utopia\Storage\Storage; use Utopia\Config\Config; use Utopia\Domains\Domain; use Utopia\Platform\Action; use Utopia\Registry\Registry; -use Utopia\DSN\DSN; -use Utopia\Queue; class Doctor extends Action { @@ -191,27 +187,6 @@ class Doctor extends Action Console::error('🔴 ' . str_pad("SMTP", 47, '.') . 'disconnected'); } - try { - $fallbackForRedis = URL::unparse([ - 'scheme' => 'redis', - 'host' => App::getEnv('_APP_REDIS_HOST', 'redis'), - 'port' => App::getEnv('_APP_REDIS_PORT', '6379'), - 'user' => App::getEnv('_APP_REDIS_USER', ''), - 'pass' => App::getEnv('_APP_REDIS_PASS', ''), - ]); - - $dsn = App::getEnv('_APP_CONNECTIONS_QUEUE', $fallbackForRedis); - $dsn = explode('=', $dsn); - $dsn = $dsn[1] ?? ''; - $dsn = new DSN($dsn); - $connection = new Queue\Connection\Redis($dsn->getHost(), $dsn->getPort()); - $client = new Client('v1-usage', $connection); - $client->getQueueSize(); - Console::success('🟢 ' . str_pad("Usage queue", 50, '.') . 'connected'); - } catch (\Throwable $th) { - Console::error('🔴 ' . str_pad("Usage queue", 47, '.') . 'disconnected'); - } - \sleep(0.2); Console::log(''); diff --git a/src/Appwrite/Utopia/Response/Model/UsageFunction.php b/src/Appwrite/Utopia/Response/Model/UsageFunction.php index f528a3c0b..03acaa750 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageFunction.php +++ b/src/Appwrite/Utopia/Response/Model/UsageFunction.php @@ -16,7 +16,7 @@ class UsageFunction extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('deployments', [ + ->addRule('deploymentsTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of function deployments.', 'default' => [], @@ -30,7 +30,7 @@ class UsageFunction extends Model 'example' => [], 'array' => true ]) - ->addRule('builds', [ + ->addRule('buildsTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of function builds.', 'default' => [], @@ -44,14 +44,14 @@ class UsageFunction extends Model 'example' => [], 'array' => true ]) - ->addRule('buildsCompute', [ + ->addRule('buildsTime', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for function build compute.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('executions', [ + ->addRule('executionsTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of function executions.', 'default' => [], @@ -59,7 +59,7 @@ class UsageFunction extends Model 'array' => true ]) - ->addRule('executionsCompute', [ + ->addRule('executionsTime', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for function execution compute.', 'default' => [], diff --git a/src/Appwrite/Utopia/Response/Model/UsageFunctions.php b/src/Appwrite/Utopia/Response/Model/UsageFunctions.php index 585eceb1e..6ab36e21a 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageFunctions.php +++ b/src/Appwrite/Utopia/Response/Model/UsageFunctions.php @@ -16,14 +16,14 @@ class UsageFunctions extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('functions', [ + ->addRule('functionsTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of functions.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('deployments', [ + ->addRule('deploymentsTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of function deployments.', 'default' => [], @@ -37,7 +37,7 @@ class UsageFunctions extends Model 'example' => [], 'array' => true ]) - ->addRule('builds', [ + ->addRule('buildsTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of function builds.', 'default' => [], @@ -51,14 +51,14 @@ class UsageFunctions extends Model 'example' => [], 'array' => true ]) - ->addRule('buildsCompute', [ + ->addRule('buildsTime', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for function build compute.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('executions', [ + ->addRule('executionsTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of function executions.', 'default' => [], @@ -66,7 +66,7 @@ class UsageFunctions extends Model 'array' => true ]) - ->addRule('executionsCompute', [ + ->addRule('executionsTime', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for function execution compute.', 'default' => [], From 5850a454e076b01e3df138c8ff269820d7296168 Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 5 Feb 2023 22:07:46 +0200 Subject: [PATCH 73/94] addressing comments --- app/config/collections.php | 2 +- app/controllers/api/account.php | 7 +- app/controllers/api/databases.php | 20 +- app/controllers/api/functions.php | 18 +- app/controllers/api/project.php | 35 +-- app/controllers/api/projects.php | 6 +- app/controllers/api/storage.php | 22 +- app/controllers/api/teams.php | 6 +- app/controllers/api/users.php | 14 +- app/controllers/general.php | 2 +- app/controllers/mock.php | 3 +- app/controllers/shared/api.php | 11 +- app/http.php | 6 +- app/init.php | 8 +- app/realtime.php | 4 +- app/worker.php | 2 +- app/workers/builds.php | 2 +- app/workers/certificates.php | 2 +- app/workers/functions.php | 6 +- app/workers/usage.php | 66 ++--- composer.lock | 67 ++--- docker-compose.yml | 8 +- src/Appwrite/Auth/Auth.php | 3 +- src/Appwrite/Messaging/Adapter/Realtime.php | 4 +- src/Appwrite/Migration/Migration.php | 2 +- src/Appwrite/Migration/Version/V15.php | 6 +- .../Tasks/PatchCreateMissingSchedules.php | 2 +- .../Specification/Format/OpenAPI3.php | 4 +- .../Specification/Format/Swagger2.php | 4 +- src/Appwrite/Utopia/Request/Filters/V15.php | 4 +- src/Appwrite/Utopia/Response/Filters/V15.php | 4 +- .../Utopia/Response/Model/Execution.php | 2 +- .../Utopia/Response/Model/UsageBuckets.php | 2 +- .../Utopia/Response/Model/UsageCollection.php | 2 +- .../Utopia/Response/Model/UsageDatabase.php | 4 +- .../Utopia/Response/Model/UsageDatabases.php | 6 +- .../Utopia/Response/Model/UsageProject.php | 14 +- .../Utopia/Response/Model/UsageStorage.php | 4 +- .../Utopia/Response/Model/UsageUsers.php | 4 +- tests/e2e/General/AbuseTest.php | 6 +- tests/e2e/General/UsageTest.php | 252 +++++++++--------- tests/e2e/Scopes/ProjectConsole.php | 2 +- tests/e2e/Scopes/ProjectCustom.php | 2 +- tests/e2e/Scopes/Scope.php | 2 +- tests/e2e/Services/Account/AccountBase.php | 2 +- .../Account/AccountConsoleClientTest.php | 2 +- .../Account/AccountCustomClientTest.php | 2 +- .../Account/AccountCustomServerTest.php | 2 +- .../e2e/Services/Databases/DatabasesBase.php | 7 +- .../Databases/DatabasesConsoleClientTest.php | 6 +- .../Databases/DatabasesCustomClientTest.php | 6 +- .../Databases/DatabasesCustomServerTest.php | 7 +- .../DatabasesPermissionsGuestTest.php | 6 +- .../DatabasesPermissionsMemberTest.php | 6 +- .../DatabasesPermissionsTeamTest.php | 6 +- .../Functions/FunctionsConsoleClientTest.php | 4 +- .../Functions/FunctionsCustomClientTest.php | 6 +- .../Functions/FunctionsCustomServerTest.php | 4 +- .../Projects/ProjectsConsoleClientTest.php | 4 +- .../Realtime/RealtimeConsoleClientTest.php | 6 +- .../Realtime/RealtimeCustomClientTest.php | 6 +- tests/e2e/Services/Storage/StorageBase.php | 6 +- .../Storage/StorageConsoleClientTest.php | 4 +- .../Storage/StorageCustomClientTest.php | 7 +- .../Storage/StorageCustomServerTest.php | 2 +- tests/e2e/Services/Teams/TeamsBase.php | 3 +- tests/e2e/Services/Teams/TeamsBaseClient.php | 2 +- .../Services/Teams/TeamsConsoleClientTest.php | 2 +- tests/e2e/Services/Users/UsersBase.php | 2 +- tests/e2e/Services/Webhooks/WebhooksBase.php | 6 +- .../Webhooks/WebhooksCustomClientTest.php | 2 +- .../Webhooks/WebhooksCustomServerTest.php | 6 +- tests/unit/Auth/AuthTest.php | 5 +- .../unit/Messaging/MessagingChannelsTest.php | 4 +- tests/unit/Messaging/MessagingGuestTest.php | 4 +- tests/unit/Messaging/MessagingTest.php | 6 +- tests/unit/Network/Validators/OriginTest.php | 2 +- .../unit/Utopia/Response/Filters/V15Test.php | 5 +- 78 files changed, 402 insertions(+), 400 deletions(-) diff --git a/app/config/collections.php b/app/config/collections.php index 87a68177b..e55c694ea 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -3,7 +3,7 @@ use Appwrite\Auth\Auth; use Utopia\Config\Config; use Utopia\Database\Database; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; $providers = Config::getParam('providers', []); $auth = Config::getParam('auth', []); diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 74ea1b5e7..647305059 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -29,10 +29,10 @@ use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\DateTime; use Utopia\Database\Exception\Duplicate; -use Utopia\Database\ID; -use Utopia\Database\Permission; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; use Utopia\Database\Query; -use Utopia\Database\Role; +use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\UID; use Utopia\Locale\Locale; @@ -53,7 +53,6 @@ App::post('/v1/account/invite') ->label('audits.event', 'user.create') ->label('audits.resource', 'user/{response.$id}') ->label('audits.userId', '{response.$id}') - ->label('usage.metric', 'users.{scope}.requests.create') ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.namespace', 'account') ->label('sdk.method', 'createWithInviteCode') diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 7fbcbcf21..3c410c4fd 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -4,10 +4,10 @@ use Utopia\App; use Appwrite\Event\Delete; use Appwrite\Extend\Exception; use Utopia\Audit\Audit; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\DatetimeValidator; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; use Utopia\Validator\Boolean; use Utopia\Validator\FloatValidator; use Utopia\Validator\Integer; @@ -851,7 +851,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Attribute Key.') ->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Range::TYPE_INTEGER), 'Attribute size for text attributes, in number of characters.') - ->param('required', null, new Boolean(true), 'Is attribute required?') + ->param('required', null, new Boolean(), 'Is attribute required?') ->param('default', null, new Text(0), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) ->param('array', false, new Boolean(), 'Is attribute an array?', true) ->inject('response') @@ -2447,9 +2447,9 @@ App::get('/v1/databases/usage') } $response->dynamic(new Document([ 'range' => $range, - 'databasesCount' => $usage[$metrics[0]], - 'collectionsCount' => $usage[$metrics[1]], - 'documentsCount' => $usage[$metrics[2]], + 'databasesTotal' => $usage[$metrics[0]], + 'collectionsTotal' => $usage[$metrics[1]], + 'documentsTotal' => $usage[$metrics[2]], ]), Response::MODEL_USAGE_DATABASES); }); @@ -2522,8 +2522,8 @@ App::get('/v1/databases/:databaseId/usage') $response->dynamic(new Document([ 'range' => $range, - 'collectionsCount' => $usage[$metrics[0]], - 'documentsCount' => $usage[$metrics[1]], + 'collectionsTotal' => $usage[$metrics[0]], + 'documentsTotal' => $usage[$metrics[1]], ]), Response::MODEL_USAGE_DATABASE); }); @@ -2599,6 +2599,6 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage') $response->dynamic(new Document([ 'range' => $range, - 'documentsCount' => $usage[$metrics[0]], + 'documentsTotal' => $usage[$metrics[0]], ]), Response::MODEL_USAGE_COLLECTION); }); diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 67c803a70..47495d56b 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -10,9 +10,9 @@ use Appwrite\Event\Usage; use Appwrite\Event\Validator\Event as ValidatorEvent; use Appwrite\Extend\Exception; use Appwrite\Utopia\Database\Validator\CustomId; -use Utopia\Database\ID; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\UID; use Utopia\Storage\Device; use Utopia\Storage\Validator\File; @@ -85,6 +85,7 @@ App::post('/v1/functions') 'deployment' => '', 'events' => $events, 'schedule' => $schedule, + 'scheduleInternalId' => '', 'scheduleUpdatedAt' => DateTime::now(), 'timeout' => $timeout, 'search' => implode(' ', [$functionId, $name, $runtime]) @@ -95,6 +96,7 @@ App::post('/v1/functions') 'region' => App::getEnv('_APP_REGION', 'default'), // Todo replace with projects region 'resourceType' => 'function', 'resourceId' => $function->getId(), + 'resourceInternalId' => $function->getInternalId(), 'resourceUpdatedAt' => DateTime::now(), 'projectId' => $project->getId(), 'schedule' => $function->getAttribute('schedule'), @@ -236,8 +238,8 @@ App::get('/v1/functions/:functionId/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - str_replace(['{resourceType}', '{resourceInternalId}'], ['functions', $function->getInternalId()], METRIC_FUNCTION_ID_DEPLOYMENTS), - str_replace(['{resourceType}', '{resourceInternalId}'], $function->getInternalId(), METRIC_FUNCTION_ID_STORAGE), + str_replace(['{resourceType}', '{resourceInternalId}'], ['function', $function->getInternalId()], METRIC_FUNCTION_ID_DEPLOYMENTS), + str_replace(['{resourceType}', '{resourceInternalId}'], ['function', $function->getInternalId()], METRIC_FUNCTION_ID_DEPLOYMENTS_STORAGE), str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS), str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_STORAGE), str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_COMPUTE), @@ -694,6 +696,7 @@ App::post('/v1/functions/:functionId/deployments') 'resourceInternalId' => $function->getInternalId(), 'resourceId' => $function->getId(), 'resourceType' => 'functions', + 'buildInternalId' => '', 'entrypoint' => $entrypoint, 'path' => $path, 'size' => $fileSize, @@ -725,6 +728,7 @@ App::post('/v1/functions/:functionId/deployments') 'resourceInternalId' => $function->getInternalId(), 'resourceId' => $function->getId(), 'resourceType' => 'functions', + 'buildInternalId' => '', 'entrypoint' => $entrypoint, 'path' => $path, 'size' => $fileSize, @@ -1168,8 +1172,8 @@ App::post('/v1/functions/:functionId/executions') * Sync execution compute usage from */ $queueForUsage - ->addMetric('executions.compute', (int)($executionResponse['duration'] * 1000))// per project - ->addMetric("{$function->getInternalId()}" . ".executions.compute", (int)($executionResponse['duration'] * 1000))// per function + ->addMetric(METRIC_EXECUTIONS_COMPUTE, (int)($executionResponse['duration'] * 1000))// per project + ->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE), (int)($executionResponse['duration'] * 1000))// per function ; } catch (\Throwable $th) { $interval = (new \DateTime())->diff(new \DateTime($execution->getCreatedAt())); diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index 26ecf5d0f..40b47b291 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -29,15 +29,15 @@ App::get('/v1/project/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - 'network.requests', - 'network.inbound', - 'network.outbound', - 'executions', - 'documents', - 'databases', - 'users', - 'files.storage', - 'buckets', + METRIC_NETWORK_REQUESTS, + METRIC_NETWORK_INBOUND, + METRIC_NETWORK_OUTBOUND, + METRIC_EXECUTIONS, + METRIC_DOCUMENTS, + METRIC_DATABASES, + METRIC_USERS, + METRIC_BUCKETS, + METRIC_FILES_STORAGE ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { @@ -50,6 +50,7 @@ App::get('/v1/project/usage') Query::limit($limit), Query::orderDesc('time'), ]); + $stats[$metric] = []; foreach ($results as $result) { $stats[$metric][$result->getAttribute('time')] = [ @@ -59,6 +60,7 @@ App::get('/v1/project/usage') } }); + $format = match ($days['period']) { '1h' => 'Y-m-d\TH:00:00.000P', '1d' => 'Y-m-d\T00:00:00.000P', @@ -77,15 +79,16 @@ App::get('/v1/project/usage') } } + $response->dynamic(new Document([ 'range' => $range, - 'requests' => ($usage[$metrics[0]]), + 'requestsTotal' => ($usage[$metrics[0]]), 'network' => ($usage[$metrics[1]] + $usage[$metrics[2]]), - 'executions' => $usage[$metrics[3]], - 'documents' => $usage[$metrics[4]], - 'databases' => $usage[$metrics[5]], - 'users' => $usage[$metrics[6]], - 'storage' => $usage[$metrics[7]], - 'buckets' => $usage[$metrics[8]], + 'executionsTotal' => $usage[$metrics[3]], + 'documentsTotal' => $usage[$metrics[4]], + 'databasesTotal' => $usage[$metrics[5]], + 'usersTotal' => $usage[$metrics[6]], + 'bucketsTotal' => $usage[$metrics[7]], + 'filesStorage' => $usage[$metrics[8]], ]), Response::MODEL_USAGE_PROJECT); }); diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 5fef7eab7..8c2725fc1 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -17,11 +17,11 @@ use Utopia\Audit\Audit; use Utopia\Config\Config; use Utopia\Database\Database; use Utopia\Database\Document; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; use Utopia\Database\DateTime; -use Utopia\Database\Permission; +use Utopia\Database\Helpers\Permission; use Utopia\Database\Query; -use Utopia\Database\Role; +use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\DatetimeValidator; use Utopia\Database\Validator\UID; use Utopia\Domains\Domain; diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index dcf5900b4..3098d91b2 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -16,10 +16,10 @@ use Utopia\Database\Exception\Duplicate; use Utopia\Database\Exception\Authorization as AuthorizationException; use Utopia\Database\Exception\Duplicate as DuplicateException; use Utopia\Database\Exception\Structure as StructureException; -use Utopia\Database\ID; -use Utopia\Database\Permission; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; use Utopia\Database\Query; -use Utopia\Database\Role; +use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; @@ -1439,8 +1439,8 @@ App::get('/v1/storage/:bucketId/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - $bucket->getInternalId() . '.files', - $bucket->getInternalId() . '.files.storage', + str_replace('{bucketId}', $bucket->getInternalId(), METRIC_BUCKET_ID_FILES), + str_replace('{bucketId}', $bucket->getInternalId(), METRIC_BUCKET_ID_FILES_STORAGE), ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { @@ -1483,7 +1483,7 @@ App::get('/v1/storage/:bucketId/usage') $response->dynamic(new Document([ 'range' => $range, - 'filesCount' => $usage[$metrics[0]], + 'filesTotal' => $usage[$metrics[0]], 'filesStorage' => $usage[$metrics[1]], ]), Response::MODEL_USAGE_BUCKETS); }); @@ -1507,9 +1507,9 @@ App::get('/v1/storage/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - 'buckets', - 'files', - 'files.storage', + METRIC_BUCKETS, + METRIC_FILES, + METRIC_FILES_STORAGE, ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { @@ -1551,8 +1551,8 @@ App::get('/v1/storage/usage') $response->dynamic(new Document([ 'range' => $range, - 'bucketsCount' => $usage[$metrics[0]], - 'filesCount' => $usage[$metrics[1]], + 'bucketsTotal' => $usage[$metrics[0]], + 'filesTotal' => $usage[$metrics[1]], 'filesStorage' => $usage[$metrics[2]], ]), Response::MODEL_USAGE_STORAGE); }); diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 572b6f02a..9d202ad35 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -25,11 +25,11 @@ use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Exception\Authorization as AuthorizationException; use Utopia\Database\Exception\Duplicate; -use Utopia\Database\ID; -use Utopia\Database\Permission; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; use Utopia\Database\Query; use Utopia\Database\DateTime; -use Utopia\Database\Role; +use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 0df53a0df..47b7b1694 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -16,9 +16,9 @@ use Appwrite\Utopia\Response; use Utopia\App; use Utopia\Audit\Audit; use Utopia\Config\Config; -use Utopia\Database\ID; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; use Utopia\Locale\Locale; use Appwrite\Extend\Exception; use Utopia\Database\Document; @@ -1089,8 +1089,8 @@ App::get('/v1/users/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - 'users', - 'sessions', + METRIC_USERS, + METRIC_SESSIONS, ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { @@ -1132,7 +1132,7 @@ App::get('/v1/users/usage') $response->dynamic(new Document([ 'range' => $range, - 'usersCount' => $usage[$metrics[0]], - 'sessionsCount' => $usage[$metrics[1]], + 'usersTotal' => $usage[$metrics[0]], + 'sessionsTotal' => $usage[$metrics[1]], ]), Response::MODEL_USAGE_USERS); }); diff --git a/app/controllers/general.php b/app/controllers/general.php index d251e4ab9..9923fd74f 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -3,7 +3,7 @@ require_once __DIR__ . '/../init.php'; use Utopia\App; -use Utopia\Database\Role; +use Utopia\Database\Helpers\Role; use Utopia\Locale\Locale; use Utopia\Logger\Logger; use Utopia\Logger\Log; diff --git a/app/controllers/mock.php b/app/controllers/mock.php index 034f18165..b980f0993 100644 --- a/app/controllers/mock.php +++ b/app/controllers/mock.php @@ -7,14 +7,13 @@ use Utopia\Database\Document; use Appwrite\Network\Validator\Host; use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; -use Appwrite\Utopia\Response\Model; use Utopia\App; use Utopia\Validator\ArrayList; use Utopia\Validator\Integer; use Utopia\Validator\Text; use Utopia\Storage\Validator\File; use Utopia\Validator\WhiteList; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; App::get('/v1/mock/tests/foo') ->desc('Get Foo') diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 8f68e4809..fff8c9ade 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -137,7 +137,7 @@ $databaseListener = function (string $event, Document $document, Document $proje ->addMetric(METRIC_DEPLOYMENTS, $value) // per project ->addMetric(METRIC_DEPLOYMENTS_STORAGE, $document->getAttribute('size') * $value) // per project ->addMetric(str_replace(['{resourceType}', '{resourceInternalId}'], [$document->getAttribute('resourceType'), $document->getAttribute('resourceInternalId')], METRIC_FUNCTION_ID_DEPLOYMENTS), $value)// per function - ->addMetric(str_replace(['{resourceType}', '{resourceInternalId}'], [$document->getAttribute('resourceType'), $document->getAttribute('resourceInternalId')], METRIC_FUNCTION_ID_STORAGE), $document->getAttribute('size') * $value);// per function + ->addMetric(str_replace(['{resourceType}', '{resourceInternalId}'], [$document->getAttribute('resourceType'), $document->getAttribute('resourceInternalId')], METRIC_FUNCTION_ID_DEPLOYMENTS_STORAGE), $document->getAttribute('size') * $value);// per function break; case $document->getCollection() === 'executions': @@ -514,19 +514,20 @@ App::shutdown() } } + + if ($project->getId() !== 'console') { if ($mode !== APP_MODE_ADMIN) { $fileSize = 0; $file = $request->getFiles('file'); - if (!empty($file)) { $fileSize = (\is_array($file['size']) && isset($file['size'][0])) ? $file['size'][0] : $file['size']; } $queueForUsage - ->addMetric('network.requests', 1) - ->addMetric("network.inbound", $request->getSize() + $fileSize) - ->addMetric("network.outbound", $response->getSize()); + ->addMetric(METRIC_NETWORK_REQUESTS, 1) + ->addMetric(METRIC_NETWORK_INBOUND, $request->getSize() + $fileSize) + ->addMetric(METRIC_NETWORK_OUTBOUND, $response->getSize()); } $queueForUsage diff --git a/app/http.php b/app/http.php index 23fd0dbcc..f241b9e15 100644 --- a/app/http.php +++ b/app/http.php @@ -10,9 +10,9 @@ use Swoole\Http\Response as SwooleResponse; use Utopia\App; use Utopia\CLI\Console; use Utopia\Config\Config; -use Utopia\Database\ID; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\Authorization; use Utopia\Audit\Audit; use Utopia\Abuse\Adapters\TimeLimit; diff --git a/app/init.php b/app/init.php index 3d7484541..1c8e6eb5c 100644 --- a/app/init.php +++ b/app/init.php @@ -41,7 +41,7 @@ use Appwrite\URL\URL as AppwriteURL; use Utopia\App; use Utopia\Validator\Range; use Utopia\Validator\WhiteList; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; use Utopia\Database\Document; use Utopia\Database\Database; use Utopia\Database\Query; @@ -199,12 +199,14 @@ const METRIC_FUNCTION_ID_BUILDS = '{functionInternalId}.builds'; const METRIC_FUNCTION_ID_BUILDS_STORAGE = '{functionInternalId}.builds.storage'; const METRIC_FUNCTION_ID_BUILDS_COMPUTE = '{functionInternalId}.builds.compute'; const METRIC_FUNCTION_ID_DEPLOYMENTS = '{resourceType}.{resourceInternalId}.deployments'; -const METRIC_FUNCTION_ID_STORAGE = '{resourceType}.{resourceInternalId}.deployments.storage'; +const METRIC_FUNCTION_ID_DEPLOYMENTS_STORAGE = '{resourceType}.{resourceInternalId}.deployments.storage'; const METRIC_EXECUTIONS = 'executions'; const METRIC_EXECUTIONS_COMPUTE = 'executions.compute'; const METRIC_FUNCTION_ID_EXECUTIONS = '{functionInternalId}.executions'; const METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE = '{functionInternalId}.executions.compute'; - +const METRIC_NETWORK_REQUESTS = 'network.requests'; +const METRIC_NETWORK_INBOUND = 'network.inbound'; +const METRIC_NETWORK_OUTBOUND = 'network.outbound'; $register = new Registry(); diff --git a/app/realtime.php b/app/realtime.php index 4b40e2a9d..f7f40de84 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -13,8 +13,8 @@ use Utopia\Abuse\Abuse; use Utopia\Abuse\Adapters\TimeLimit; use Utopia\App; use Utopia\CLI\Console; -use Utopia\Database\ID; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Role; use Utopia\Logger\Log; use Utopia\Database\DateTime; use Utopia\Database\Document; diff --git a/app/worker.php b/app/worker.php index 78671d731..6be41e448 100644 --- a/app/worker.php +++ b/app/worker.php @@ -107,7 +107,7 @@ Server::setResource('pools', function ($register) { $pools = $register->get('pools'); $connection = $pools->get('queue')->pop()->getResource(); $workerNumber = swoole_cpu_num() * intval(App::getEnv('_APP_WORKER_PER_CORE', 6)); - +$workerNumber = 1; if (empty(App::getEnv('QUEUE'))) { throw new Exception('Please configure "QUEUE" environemnt variable.'); } diff --git a/app/workers/builds.php b/app/workers/builds.php index bfcb29770..9145808b6 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -9,7 +9,7 @@ use Executor\Executor; use Utopia\Database\DateTime; use Utopia\App; use Utopia\CLI\Console; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; use Utopia\DSN\DSN; use Utopia\Database\Document; use Utopia\Config\Config; diff --git a/app/workers/certificates.php b/app/workers/certificates.php index b4f0701c4..60ee3e8e0 100644 --- a/app/workers/certificates.php +++ b/app/workers/certificates.php @@ -8,7 +8,7 @@ use Utopia\CLI\Console; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\DateTime; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; use Utopia\Database\Query; use Utopia\Domains\Domain; diff --git a/app/workers/functions.php b/app/workers/functions.php index e649fed2f..60b9bec5a 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -14,10 +14,10 @@ use Utopia\CLI\Console; use Utopia\Config\Config; use Utopia\Database\Database; use Utopia\Database\Document; -use Utopia\Database\ID; -use Utopia\Database\Permission; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; use Utopia\Database\Query; -use Utopia\Database\Role; +use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\Authorization; use Utopia\Queue\Server; diff --git a/app/workers/usage.php b/app/workers/usage.php index 450de6955..a4d7315ab 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -45,27 +45,27 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools switch (true) { case $document->getCollection() === 'users': // users - $sessions = count($document->getAttribute('sessions', 0)); + $sessions = count($document->getAttribute(METRIC_SESSIONS, 0)); if (!empty($sessions)) { $metrics[] = [ - 'key' => 'sessions', + 'key' => METRIC_SESSIONS, 'value' => ($sessions * -1), ]; } break; case $document->getCollection() === 'databases': // databases - $collections = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".collections")); - $documents = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".documents")); + $collections = $dbForProject->getDocument('stats', md5("_inf_" . str_replace('{databaseId}', $document->getInternalId(), METRIC_DATABASE_ID_COLLECTIONS))); + $documents = $dbForProject->getDocument('stats', md5("_inf_" . str_replace('{databaseId}', $document->getInternalId(), METRIC_DATABASE_ID_DOCUMENTS))); if (!empty($collections['value'])) { $metrics[] = [ - 'key' => 'collections', + 'key' => METRIC_COLLECTIONS, 'value' => ($collections['value'] * -1), ]; } if (!empty($documents['value'])) { $metrics[] = [ - 'key' => 'documents', + 'key' => METRIC_DOCUMENTS, 'value' => ($documents['value'] * -1), ]; } @@ -73,93 +73,93 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools case str_starts_with($document->getCollection(), 'database_') && !str_contains($document->getCollection(), 'collection'): //collections $parts = explode('_', $document->getCollection()); $databaseId = $parts[1] ?? 0; - $documents = $dbForProject->getDocument('stats', md5("_inf_" . "{$databaseId}" . "." . "{$document->getInternalId()}" . ".documents")); + $documents = $dbForProject->getDocument('stats', md5("_inf_" . str_replace(['{databaseId}', '{collectionId}'], [$databaseId, $document->getInternalId()], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS))); if (!empty($documents['value'])) { $metrics[] = [ - 'key' => 'documents', + 'key' => METRIC_DOCUMENTS, 'value' => ($documents['value'] * -1), ]; $metrics[] = [ - 'key' => "{$databaseId}" . ".documents", + 'key' => str_replace('{databaseId}', $databaseId, METRIC_DATABASE_ID_DOCUMENTS), 'value' => ($documents['value'] * -1), ]; } break; case $document->getCollection() === 'buckets': - $files = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".files")); - $storage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".files.storage")); + $files = $dbForProject->getDocument('stats', md5("_inf_" . str_replace('{bucketId}', $document->getInternalId(), METRIC_BUCKET_ID_FILES))); + $storage = $dbForProject->getDocument('stats', md5("_inf_" . str_replace('{bucketId}', $document->getInternalId(), METRIC_BUCKET_ID_FILES_STORAGE))); if (!empty($files['value'])) { $metrics[] = [ - 'key' => 'files', + 'key' => METRIC_FILES, 'value' => ($files['value'] * -1), ]; } if (!empty($storage['value'])) { $metrics[] = [ - 'key' => 'files.storage', + 'key' => METRIC_FILES_STORAGE, 'value' => ($storage['value'] * -1), ]; } break; case $document->getCollection() === 'functions': - $deployments = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getInternalId()}" . ".deployments")); - $deploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_function." . "{$document->getInternalId()}" . ".deployments.storage")); - $builds = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".builds")); - $buildsStorage = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".builds.storage")); - $buildsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".builds.compute")); - $executions = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".executions")); - $executionsCompute = $dbForProject->getDocument('stats', md5("_inf_" . "{$document->getInternalId()}" . ".executions.compute")); + $deployments = $dbForProject->getDocument('stats', md5("_inf_" . str_replace(['{resourceType}', '{resourceInternalId}'], ['function', $document->getInternalId()], METRIC_FUNCTION_ID_DEPLOYMENTS))); + $deploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_" . str_replace(['{resourceType}', '{resourceInternalId}'], ['function', $document->getInternalId()], METRIC_FUNCTION_ID_DEPLOYMENTS_STORAGE))); + $builds = $dbForProject->getDocument('stats', md5("_inf_" . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_BUILDS))); + $buildsStorage = $dbForProject->getDocument('stats', md5("_inf_" . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_BUILDS_STORAGE))); + $buildsCompute = $dbForProject->getDocument('stats', md5("_inf_" . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_BUILDS_COMPUTE))); + $executions = $dbForProject->getDocument('stats', md5("_inf_" . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS))); + $executionsCompute = $dbForProject->getDocument('stats', md5("_inf_" . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE))); if (!empty($deployments['value'])) { $metrics[] = [ - 'key' => 'deployments', + 'key' => METRIC_DEPLOYMENTS, 'value' => ($deployments['value'] * -1), ]; } if (!empty($deploymentsStorage['value'])) { $metrics[] = [ - 'key' => 'deployments.storage', + 'key' => METRIC_DEPLOYMENTS_STORAGE, 'value' => ($deploymentsStorage['value'] * -1), ]; } if (!empty($builds['value'])) { $metrics[] = [ - 'key' => 'builds', + 'key' => METRIC_BUILDS, 'value' => ($builds['value'] * -1), ]; } if (!empty($buildsStorage['value'])) { $metrics[] = [ - 'key' => 'builds.storage', + 'key' => METRIC_BUILDS_STORAGE, 'value' => ($buildsStorage['value'] * -1), ]; } if (!empty($buildsCompute['value'])) { $metrics[] = [ - 'key' => 'builds.compute', + 'key' => METRIC_BUILDS_COMPUTE, 'value' => ($buildsCompute['value'] * -1), ]; } if (!empty($executions['value'])) { $metrics[] = [ - 'key' => 'executions', + 'key' => METRIC_EXECUTIONS, 'value' => ($executionsCompute['value'] * -1), ]; } if (!empty($executionsCompute['value'])) { $metrics[] = [ - 'key' => 'executions.compute', + 'key' => METRIC_EXECUTIONS_COMPUTE, 'value' => ($executionsCompute['value'] * -1), ]; } @@ -234,7 +234,7 @@ $server $dbForProject->setNamespace('_' . $projectInternalId); - foreach ($project['keys'] as $key => $value) { + foreach ($project['keys'] ?? [] as $key => $value) { if ($value == 0) { continue; } @@ -271,10 +271,12 @@ $server } } } - $dbForProject->createDocument('statsLogger', new Document([ - 'time' => DateTime::now(), - 'metrics' => $project['keys'], - ])); + if (!empty($project['keys'])) { + $dbForProject->createDocument('statsLogger', new Document([ + 'time' => DateTime::now(), + 'metrics' => $project['keys'], + ])); + } } catch (\Exception $e) { console::error("[logger] " . " {DateTime::now()} " . " {$projectInternalId} " . " {$e->getMessage()}"); } finally { diff --git a/composer.lock b/composer.lock index 3af341a1c..2e7ffda63 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": "36ef20efb91c04f1985f7dbaf52450f5", + "content-hash": "290f8f03716871b264f9dd88b0ef60a9", "packages": [ { "name": "adhocore/jwt", @@ -2246,16 +2246,16 @@ }, { "name": "utopia-php/storage", - "version": "0.13.0", + "version": "0.13.2", "source": { "type": "git", "url": "https://github.com/utopia-php/storage.git", - "reference": "f34c010e4f8394a6b4aff70b6de55041d9a145d3" + "reference": "ad1c00f24ca56e73888acc2af3deee4919b1194b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/storage/zipball/f34c010e4f8394a6b4aff70b6de55041d9a145d3", - "reference": "f34c010e4f8394a6b4aff70b6de55041d9a145d3", + "url": "https://api.github.com/repos/utopia-php/storage/zipball/ad1c00f24ca56e73888acc2af3deee4919b1194b", + "reference": "ad1c00f24ca56e73888acc2af3deee4919b1194b", "shasum": "" }, "require": { @@ -2295,9 +2295,9 @@ ], "support": { "issues": "https://github.com/utopia-php/storage/issues", - "source": "https://github.com/utopia-php/storage/tree/0.13.0" + "source": "https://github.com/utopia-php/storage/tree/0.13.2" }, - "time": "2022-11-17T15:10:18+00:00" + "time": "2022-12-20T11:11:35+00:00" }, { "name": "utopia-php/swoole", @@ -3162,20 +3162,20 @@ }, { "name": "phpspec/prophecy", - "version": "v1.16.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359" + "reference": "15873c65b207b07765dbc3c95d20fdf4a320cbe2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be8cac52a0827776ff9ccda8c381ac5b71aeb359", - "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/15873c65b207b07765dbc3c95d20fdf4a320cbe2", + "reference": "15873c65b207b07765dbc3c95d20fdf4a320cbe2", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.2", + "doctrine/instantiator": "^1.2 || ^2.0", "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", "phpdocumentor/reflection-docblock": "^5.2", "sebastian/comparator": "^3.0 || ^4.0", @@ -3183,6 +3183,7 @@ }, "require-dev": { "phpspec/phpspec": "^6.0 || ^7.0", + "phpstan/phpstan": "^1.9", "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", @@ -3223,9 +3224,9 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.16.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.17.0" }, - "time": "2022-11-29T15:06:56+00:00" + "time": "2023-02-02T15:41:36+00:00" }, { "name": "phpunit/php-code-coverage", @@ -4014,16 +4015,16 @@ }, { "name": "sebastian/environment", - "version": "5.1.4", + "version": "5.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", "shasum": "" }, "require": { @@ -4065,7 +4066,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" }, "funding": [ { @@ -4073,7 +4074,7 @@ "type": "github" } ], - "time": "2022-04-03T09:37:03+00:00" + "time": "2023-02-03T06:03:51+00:00" }, { "name": "sebastian/exporter", @@ -4387,16 +4388,16 @@ }, { "name": "sebastian/recursion-context", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", "shasum": "" }, "require": { @@ -4435,10 +4436,10 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" }, "funding": [ { @@ -4446,7 +4447,7 @@ "type": "github" } ], - "time": "2020-10-26T13:17:30+00:00" + "time": "2023-02-03T06:07:39+00:00" }, { "name": "sebastian/resource-operations", @@ -4505,16 +4506,16 @@ }, { "name": "sebastian/type", - "version": "3.2.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", "shasum": "" }, "require": { @@ -4549,7 +4550,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" }, "funding": [ { @@ -4557,7 +4558,7 @@ "type": "github" } ], - "time": "2022-09-12T14:47:03+00:00" + "time": "2023-02-03T06:13:03+00:00" }, { "name": "sebastian/version", diff --git a/docker-compose.yml b/docker-compose.yml index d1025c822..05eb75f19 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -554,6 +554,8 @@ services: environment: - _APP_ENV - _APP_WORKER_PER_CORE + - _APP_CONNECTIONS_MAX + - _APP_POOL_CLIENTS - _APP_DOMAIN - _APP_DOMAIN_TARGET - _APP_OPENSSL_KEY_V1 @@ -653,7 +655,7 @@ services: image: openruntimes/executor:0.2.0 networks: - appwrite - - openruntimes-runtimes + - runtimes volumes: - /var/run/docker.sock:/var/run/docker.sock - appwrite-builds:/storage/builds:rw @@ -809,8 +811,8 @@ networks: name: gateway appwrite: name: appwrite - openruntimes-runtimes: - name: openruntimes-runtimes + runtimes: + name: runtimes volumes: appwrite-mariadb: diff --git a/src/Appwrite/Auth/Auth.php b/src/Appwrite/Auth/Auth.php index b397e9ea7..63b6a254f 100644 --- a/src/Appwrite/Auth/Auth.php +++ b/src/Appwrite/Auth/Auth.php @@ -9,10 +9,9 @@ use Appwrite\Auth\Hash\Phpass; use Appwrite\Auth\Hash\Scrypt; use Appwrite\Auth\Hash\Scryptmodified; use Appwrite\Auth\Hash\Sha; -use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\DateTime; -use Utopia\Database\Role; +use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Roles; diff --git a/src/Appwrite/Messaging/Adapter/Realtime.php b/src/Appwrite/Messaging/Adapter/Realtime.php index dddbc59e7..435972d0f 100644 --- a/src/Appwrite/Messaging/Adapter/Realtime.php +++ b/src/Appwrite/Messaging/Adapter/Realtime.php @@ -6,8 +6,8 @@ use Utopia\Database\DateTime; use Utopia\Database\Document; use Appwrite\Messaging\Adapter; use Utopia\App; -use Utopia\Database\ID; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Role; class Realtime extends Adapter { diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index a0c237fd5..251e72fe6 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -10,7 +10,7 @@ use Utopia\CLI\Console; use Utopia\Config\Config; use Exception; use Utopia\App; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; use Utopia\Database\Validator\Authorization; Runtime::enableCoroutine(SWOOLE_HOOK_ALL); diff --git a/src/Appwrite/Migration/Version/V15.php b/src/Appwrite/Migration/Version/V15.php index f549c7fbd..ac948d01d 100644 --- a/src/Appwrite/Migration/Version/V15.php +++ b/src/Appwrite/Migration/Version/V15.php @@ -11,9 +11,9 @@ use Utopia\CLI\Console; use Utopia\Config\Config; use Utopia\Database\Database; use Utopia\Database\Document; -use Utopia\Database\ID; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; class V15 extends Migration { diff --git a/src/Appwrite/Platform/Tasks/PatchCreateMissingSchedules.php b/src/Appwrite/Platform/Tasks/PatchCreateMissingSchedules.php index 32b988634..74ef64449 100644 --- a/src/Appwrite/Platform/Tasks/PatchCreateMissingSchedules.php +++ b/src/Appwrite/Platform/Tasks/PatchCreateMissingSchedules.php @@ -8,7 +8,7 @@ use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Query; use Utopia\Database\Database; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; use Utopia\Database\Validator\Authorization; class PatchCreateMissingSchedules extends Action diff --git a/src/Appwrite/Specification/Format/OpenAPI3.php b/src/Appwrite/Specification/Format/OpenAPI3.php index fb7208c56..1ad5dfd89 100644 --- a/src/Appwrite/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/Specification/Format/OpenAPI3.php @@ -5,8 +5,8 @@ namespace Appwrite\Specification\Format; use Appwrite\Specification\Format; use Appwrite\Template\Template; use Appwrite\Utopia\Response\Model; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; use Utopia\Validator; class OpenAPI3 extends Format diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php index 6eb27a11a..7d056bea6 100644 --- a/src/Appwrite/Specification/Format/Swagger2.php +++ b/src/Appwrite/Specification/Format/Swagger2.php @@ -5,8 +5,8 @@ namespace Appwrite\Specification\Format; use Appwrite\Specification\Format; use Appwrite\Template\Template; use Appwrite\Utopia\Response\Model; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; use Utopia\Validator; class Swagger2 extends Format diff --git a/src/Appwrite/Utopia/Request/Filters/V15.php b/src/Appwrite/Utopia/Request/Filters/V15.php index 65b09e1f2..50e5ec0db 100644 --- a/src/Appwrite/Utopia/Request/Filters/V15.php +++ b/src/Appwrite/Utopia/Request/Filters/V15.php @@ -4,9 +4,9 @@ namespace Appwrite\Utopia\Request\Filters; use Appwrite\Utopia\Request\Filter; use Utopia\Database\Database; -use Utopia\Database\Permission; +use Utopia\Database\Helpers\Permission; use Utopia\Database\Query; -use Utopia\Database\Role; +use Utopia\Database\Helpers\Role; class V15 extends Filter { diff --git a/src/Appwrite/Utopia/Response/Filters/V15.php b/src/Appwrite/Utopia/Response/Filters/V15.php index a74f0f32a..232feec20 100644 --- a/src/Appwrite/Utopia/Response/Filters/V15.php +++ b/src/Appwrite/Utopia/Response/Filters/V15.php @@ -5,8 +5,8 @@ namespace Appwrite\Utopia\Response\Filters; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Filter; use Utopia\Database\Database; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; class V15 extends Filter { diff --git a/src/Appwrite/Utopia/Response/Model/Execution.php b/src/Appwrite/Utopia/Response/Model/Execution.php index 13011a24b..8672a9159 100644 --- a/src/Appwrite/Utopia/Response/Model/Execution.php +++ b/src/Appwrite/Utopia/Response/Model/Execution.php @@ -4,7 +4,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Model; -use Utopia\Database\Role; +use Utopia\Database\Helpers\Role; class Execution extends Model { diff --git a/src/Appwrite/Utopia/Response/Model/UsageBuckets.php b/src/Appwrite/Utopia/Response/Model/UsageBuckets.php index 40d5c6c4a..83b874476 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageBuckets.php +++ b/src/Appwrite/Utopia/Response/Model/UsageBuckets.php @@ -16,7 +16,7 @@ class UsageBuckets extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('filesCount', [ + ->addRule('filesTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of files in this bucket.', 'default' => [], diff --git a/src/Appwrite/Utopia/Response/Model/UsageCollection.php b/src/Appwrite/Utopia/Response/Model/UsageCollection.php index 1f60076d0..5abcf46b7 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageCollection.php +++ b/src/Appwrite/Utopia/Response/Model/UsageCollection.php @@ -16,7 +16,7 @@ class UsageCollection extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('documentsCount', [ + ->addRule('documentsTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of documents.', 'default' => [], diff --git a/src/Appwrite/Utopia/Response/Model/UsageDatabase.php b/src/Appwrite/Utopia/Response/Model/UsageDatabase.php index 7f3aab29a..58d49c506 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageDatabase.php +++ b/src/Appwrite/Utopia/Response/Model/UsageDatabase.php @@ -16,14 +16,14 @@ class UsageDatabase extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('collectionsCount', [ + ->addRule('collectionsTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of collections.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('documentsCount', [ + ->addRule('documentsTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of documents.', 'default' => [], diff --git a/src/Appwrite/Utopia/Response/Model/UsageDatabases.php b/src/Appwrite/Utopia/Response/Model/UsageDatabases.php index a37639c28..a6008ca9e 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageDatabases.php +++ b/src/Appwrite/Utopia/Response/Model/UsageDatabases.php @@ -16,21 +16,21 @@ class UsageDatabases extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('databasesCount', [ + ->addRule('databasesTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of documents.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('collectionsCount', [ + ->addRule('collectionsTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of collections.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('documentsCount', [ + ->addRule('documentsTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of documents.', 'default' => [], diff --git a/src/Appwrite/Utopia/Response/Model/UsageProject.php b/src/Appwrite/Utopia/Response/Model/UsageProject.php index e37bc5928..641613809 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageProject.php +++ b/src/Appwrite/Utopia/Response/Model/UsageProject.php @@ -16,7 +16,7 @@ class UsageProject extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('requests', [ + ->addRule('requestsTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of requests.', 'default' => [], @@ -30,42 +30,42 @@ class UsageProject extends Model 'example' => [], 'array' => true ]) - ->addRule('executions', [ + ->addRule('executionsTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for function executions.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('documents', [ + ->addRule('documentsTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of documents.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('databases', [ + ->addRule('databasesTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of databases.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('users', [ + ->addRule('usersTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of users.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('storage', [ + ->addRule('filesStorage', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for the occupied storage size (in bytes).', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('buckets', [ + ->addRule('bucketsTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for number of buckets.', 'default' => [], diff --git a/src/Appwrite/Utopia/Response/Model/UsageStorage.php b/src/Appwrite/Utopia/Response/Model/UsageStorage.php index fe2f60567..88d0beca0 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageStorage.php +++ b/src/Appwrite/Utopia/Response/Model/UsageStorage.php @@ -16,14 +16,14 @@ class UsageStorage extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('bucketsCount', [ + ->addRule('bucketsTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of buckets.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('filesCount', [ + ->addRule('filesTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of files.', 'default' => [], diff --git a/src/Appwrite/Utopia/Response/Model/UsageUsers.php b/src/Appwrite/Utopia/Response/Model/UsageUsers.php index 335cb351a..c0cc4baa5 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageUsers.php +++ b/src/Appwrite/Utopia/Response/Model/UsageUsers.php @@ -16,7 +16,7 @@ class UsageUsers extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('usersCount', [ + ->addRule('usersTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for total number of users.', 'default' => [], @@ -24,7 +24,7 @@ class UsageUsers extends Model 'array' => true ]) - ->addRule('sessionsCount', [ + ->addRule('sessionsTotal', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for sessions created.', 'default' => [], diff --git a/tests/e2e/General/AbuseTest.php b/tests/e2e/General/AbuseTest.php index 90a4b3380..f5a282997 100644 --- a/tests/e2e/General/AbuseTest.php +++ b/tests/e2e/General/AbuseTest.php @@ -8,9 +8,9 @@ use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideNone; use Utopia\App; -use Utopia\Database\ID; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; class AbuseTest extends Scope { diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index 6fffb037a..f171e1e77 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -9,8 +9,9 @@ use Tests\E2E\Scopes\SideServer; use CURLFile; use Tests\E2E\Services\Functions\FunctionsBase; use Utopia\Database\DateTime; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; +use Utopia\Database\Validator\DatetimeValidator; class UsageTest extends Scope { @@ -45,8 +46,8 @@ class UsageTest extends Scope $headers['x-appwrite-key'] = $project['apiKey']; $headers['content-type'] = 'application/json'; - $usersCount = 0; - $requestsCount = 0; + $usersTotal = 0; + $requestsTotal = 0; for ($i = 0; $i < self::CREATE; $i++) { $email = uniqid() . 'user@usage.test'; $password = 'password'; @@ -65,23 +66,23 @@ class UsageTest extends Scope $this->assertEquals($email, $res['body']['email']); $this->assertNotEmpty($res['body']['$id']); - $usersCount++; - $requestsCount++; + $usersTotal++; + $requestsTotal++; if ($i < (self::CREATE / 2)) { $userId = $res['body']['$id']; $res = $this->client->call(Client::METHOD_DELETE, '/users/' . $userId, $headers); $this->assertEmpty($res['body']); - $requestsCount++; - $usersCount--; + $requestsTotal++; + $usersTotal--; } } return [ 'projectId' => $projectId, 'headers' => $headers, - 'usersCount' => $usersCount, - 'requestsCount' => $requestsCount + 'usersTotal' => $usersTotal, + 'requestsTotal' => $requestsTotal ]; } @@ -94,8 +95,8 @@ class UsageTest extends Scope $projectId = $data['projectId']; $headers = $data['headers']; - $usersCount = $data['usersCount']; - $requestsCount = $data['requestsCount']; + $usersTotal = $data['usersTotal']; + $requestsTotal = $data['requestsTotal']; $consoleHeaders = [ 'origin' => 'http://localhost', @@ -114,12 +115,12 @@ class UsageTest extends Scope $this->assertEquals('24h', $res['range']); $this->assertEquals(9, count($res)); - $this->assertEquals(24, count($res['requests'])); - $this->assertEquals(24, count($res['users'])); - $this->assertEquals($usersCount, $res['users'][array_key_last($res['users'])]['value']); - $this->validateDates($res['users']); - $this->assertEquals($requestsCount, $res['requests'][array_key_last($res['requests'])]['value']); - $this->validateDates($res['requests']); + $this->assertEquals(24, count($res['requestsTotal'])); + $this->assertEquals(24, count($res['usersTotal'])); + $this->assertEquals($usersTotal, $res['usersTotal'][array_key_last($res['usersTotal'])]['value']); + $this->validateDates($res['usersTotal']); + $this->assertEquals($requestsTotal, $res['requestsTotal'][array_key_last($res['requestsTotal'])]['value']); + $this->validateDates($res['requestsTotal']); $res = $this->client->call( Client::METHOD_GET, @@ -129,15 +130,15 @@ class UsageTest extends Scope $res = $res['body']; $this->assertEquals('90d', $res['range']); - $this->assertEquals(90, count($res['usersCount'])); - $this->assertEquals(90, count($res['sessionsCount'])); - $this->assertEquals((self::CREATE / 2), $res['usersCount'][array_key_last($res['usersCount'])]['value']); + $this->assertEquals(90, count($res['usersTotal'])); + $this->assertEquals(90, count($res['sessionsTotal'])); + $this->assertEquals((self::CREATE / 2), $res['usersTotal'][array_key_last($res['usersTotal'])]['value']); return [ 'projectId' => $projectId, 'headers' => $headers, 'consoleHeaders' => $consoleHeaders, - 'requestsCount' => $requestsCount, + 'requestsTotal' => $requestsTotal, ]; } @@ -145,10 +146,10 @@ class UsageTest extends Scope public function testPrepareStorageStats(array $data): array { $headers = $data['headers']; - $bucketsCount = 0; - $requestsCount = $data['requestsCount']; + $bucketsTotal = 0; + $requestsTotal = $data['requestsTotal']; $storageTotal = 0; - $filesCount = 0; + $filesTotal = 0; for ($i = 0; $i < self::CREATE; $i++) { @@ -177,8 +178,8 @@ class UsageTest extends Scope $this->assertEquals($name, $res['body']['name']); $this->assertNotEmpty($res['body']['$id']); $bucketId = $res['body']['$id']; - $bucketsCount++; - $requestsCount++; + $bucketsTotal++; + $requestsTotal++; if ($i < (self::CREATE / 2)) { $res = $this->client->call( @@ -187,8 +188,8 @@ class UsageTest extends Scope $headers ); $this->assertEmpty($res['body']); - $requestsCount++; - $bucketsCount--; + $requestsTotal++; + $bucketsTotal--; } } @@ -229,8 +230,8 @@ class UsageTest extends Scope $fileSize = $res['body']['sizeOriginal']; $storageTotal += $fileSize; - $filesCount++; - $requestsCount++; + $filesTotal++; + $requestsTotal++; $fileId = $res['body']['$id']; if ($i < (self::CREATE / 2)) { @@ -240,18 +241,18 @@ class UsageTest extends Scope $headers ); $this->assertEmpty($res['body']); - $requestsCount++; - $filesCount--; + $requestsTotal++; + $filesTotal--; $storageTotal -= $fileSize; } } return array_merge($data, [ 'bucketId' => $bucketId, - 'bucketsCount' => $bucketsCount, - 'requestsCount' => $requestsCount, + 'bucketsTotal' => $bucketsTotal, + 'requestsTotal' => $requestsTotal, 'storageTotal' => $storageTotal, - 'filesCount' => $filesCount, + 'filesTotal' => $filesTotal, ]); } @@ -261,10 +262,10 @@ class UsageTest extends Scope public function testStorageStats(array $data): array { $bucketId = $data['bucketId']; - $bucketsCount = $data['bucketsCount']; - $requestsCount = $data['requestsCount']; + $bucketsTotal = $data['bucketsTotal']; + $requestsTotal = $data['requestsTotal']; $storageTotal = $data['storageTotal']; - $filesCount = $data['filesCount']; + $filesTotal = $data['filesTotal']; sleep(self::WAIT); @@ -279,12 +280,12 @@ class UsageTest extends Scope $res = $res['body']; $this->assertEquals(9, count($res)); - $this->assertEquals(30, count($res['requests'])); - $this->assertEquals(30, count($res['storage'])); - $this->assertEquals($requestsCount, $res['requests'][array_key_last($res['requests'])]['value']); - $this->validateDates($res['requests']); - $this->assertEquals($storageTotal, $res['storage'][array_key_last($res['storage'])]['value']); - $this->validateDates($res['storage']); + $this->assertEquals(30, count($res['requestsTotal'])); + $this->assertEquals(30, count($res['filesStorage'])); + $this->assertEquals($requestsTotal, $res['requestsTotal'][array_key_last($res['requestsTotal'])]['value']); + $this->validateDates($res['requestsTotal']); + $this->assertEquals($storageTotal, $res['filesStorage'][array_key_last($res['filesStorage'])]['value']); + $this->validateDates($res['filesStorage']); $res = $this->client->call( Client::METHOD_GET, @@ -296,12 +297,12 @@ class UsageTest extends Scope ); $res = $res['body']; - $this->assertEquals($storageTotal, $res['filesStorage'][array_key_last($res['filesStorage'])]['value']); + $this->assertEquals($storageTotal, $res['filesStorage'][array_key_last($res['filesTotal'])]['value']); $this->validateDates($res['filesStorage']); - $this->assertEquals($bucketsCount, $res['bucketsCount'][array_key_last($res['bucketsCount'])]['value']); - $this->validateDates($res['bucketsCount']); - $this->assertEquals($filesCount, $res['filesCount'][array_key_last($res['filesCount'])]['value']); - $this->validateDates($res['filesCount']); + $this->assertEquals($bucketsTotal, $res['bucketsTotal'][array_key_last($res['bucketsTotal'])]['value']); + $this->validateDates($res['bucketsTotal']); + $this->assertEquals($filesTotal, $res['filesTotal'][array_key_last($res['filesTotal'])]['value']); + $this->validateDates($res['filesTotal']); $res = $this->client->call( Client::METHOD_GET, @@ -314,9 +315,9 @@ class UsageTest extends Scope $res = $res['body']; $this->assertEquals($storageTotal, $res['filesStorage'][array_key_last($res['filesStorage'])]['value']); - $this->assertEquals($filesCount, $res['filesCount'][array_key_last($res['filesCount'])]['value']); + $this->assertEquals($filesTotal, $res['filesTotal'][array_key_last($res['filesTotal'])]['value']); - $data['requestsCount'] = $requestsCount; + $data['requestsTotal'] = $requestsTotal; return $data; } @@ -326,10 +327,10 @@ class UsageTest extends Scope { $headers = $data['headers']; - $requestsCount = $data['requestsCount']; - $databasesCount = 0; - $collectionsCount = 0; - $documentsCount = 0; + $requestsTotal = $data['requestsTotal']; + $databasesTotal = 0; + $collectionsTotal = 0; + $documentsTotal = 0; for ($i = 0; $i < self::CREATE; $i++) { $name = uniqid() . ' database'; @@ -348,8 +349,8 @@ class UsageTest extends Scope $this->assertNotEmpty($res['body']['$id']); $databaseId = $res['body']['$id']; - $requestsCount++; - $databasesCount++; + $requestsTotal++; + $databasesTotal++; if ($i < (self::CREATE / 2)) { $res = $this->client->call( @@ -359,8 +360,8 @@ class UsageTest extends Scope ); $this->assertEmpty($res['body']); - $databasesCount--; - $requestsCount++; + $databasesTotal--; + $requestsTotal++; } } @@ -387,8 +388,8 @@ class UsageTest extends Scope $this->assertNotEmpty($res['body']['$id']); $collectionId = $res['body']['$id']; - $requestsCount++; - $collectionsCount++; + $requestsTotal++; + $collectionsTotal++; if ($i < (self::CREATE / 2)) { $res = $this->client->call( @@ -397,8 +398,8 @@ class UsageTest extends Scope $headers ); $this->assertEmpty($res['body']); - $collectionsCount--; - $requestsCount++; + $collectionsTotal--; + $requestsTotal++; } } @@ -414,7 +415,7 @@ class UsageTest extends Scope ); $this->assertEquals('name', $res['body']['key']); - $requestsCount++; + $requestsTotal++; sleep(self::WAIT); @@ -433,8 +434,8 @@ class UsageTest extends Scope $this->assertNotEmpty($res['body']['$id']); $documentId = $res['body']['$id']; - $requestsCount++; - $documentsCount++; + $requestsTotal++; + $documentsTotal++; if ($i < (self::CREATE / 2)) { $res = $this->client->call( @@ -443,18 +444,18 @@ class UsageTest extends Scope $headers ); $this->assertEmpty($res['body']); - $documentsCount--; - $requestsCount++; + $documentsTotal--; + $requestsTotal++; } } return array_merge($data, [ 'databaseId' => $databaseId, 'collectionId' => $collectionId, - 'requestsCount' => $requestsCount, - 'databasesCount' => $databasesCount, - 'collectionsCount' => $collectionsCount, - 'documentsCount' => $documentsCount, + 'requestsTotal' => $requestsTotal, + 'databasesTotal' => $databasesTotal, + 'collectionsTotal' => $collectionsTotal, + 'documentsTotal' => $documentsTotal, ]); } @@ -466,10 +467,10 @@ class UsageTest extends Scope $projectId = $data['projectId']; $databaseId = $data['databaseId']; $collectionId = $data['collectionId']; - $requestsCount = $data['requestsCount']; - $databasesCount = $data['databasesCount']; - $collectionsCount = $data['collectionsCount']; - $documentsCount = $data['documentsCount']; + $requestsTotal = $data['requestsTotal']; + $databasesTotal = $data['databasesTotal']; + $collectionsTotal = $data['collectionsTotal']; + $documentsTotal = $data['documentsTotal']; sleep(self::WAIT); @@ -481,14 +482,14 @@ class UsageTest extends Scope $res = $res['body']; $this->assertEquals(9, count($res)); - $this->assertEquals(30, count($res['requests'])); - $this->assertEquals(30, count($res['storage'])); - $this->assertEquals($requestsCount, $res['requests'][array_key_last($res['requests'])]['value']); - $this->validateDates($res['requests']); - $this->assertEquals($databasesCount, $res['databases'][array_key_last($res['databases'])]['value']); - $this->validateDates($res['databases']); - $this->assertEquals($documentsCount, $res['documents'][array_key_last($res['documents'])]['value']); - $this->validateDates($res['documents']); + $this->assertEquals(30, count($res['requestsTotal'])); + $this->assertEquals(30, count($res['filesStorage'])); + $this->assertEquals($requestsTotal, $res['requestsTotal'][array_key_last($res['requestsTotal'])]['value']); + $this->validateDates($res['requestsTotal']); + $this->assertEquals($databasesTotal, $res['databasesTotal'][array_key_last($res['databasesTotal'])]['value']); + $this->validateDates($res['databasesTotal']); + $this->assertEquals($documentsTotal, $res['documentsTotal'][array_key_last($res['documentsTotal'])]['value']); + $this->validateDates($res['documentsTotal']); $res = $this->client->call( Client::METHOD_GET, @@ -497,12 +498,12 @@ class UsageTest extends Scope ); $res = $res['body']; - $this->assertEquals($databasesCount, $res['databasesCount'][array_key_last($res['databasesCount'])]['value']); - $this->validateDates($res['databasesCount']); - $this->assertEquals($collectionsCount, $res['collectionsCount'][array_key_last($res['collectionsCount'])]['value']); - $this->validateDates($res['collectionsCount']); - $this->assertEquals($documentsCount, $res['documentsCount'][array_key_last($res['documentsCount'])]['value']); - $this->validateDates($res['documentsCount']); + $this->assertEquals($databasesTotal, $res['databasesTotal'][array_key_last($res['databasesTotal'])]['value']); + $this->validateDates($res['databasesTotal']); + $this->assertEquals($collectionsTotal, $res['collectionsTotal'][array_key_last($res['collectionsTotal'])]['value']); + $this->validateDates($res['collectionsTotal']); + $this->assertEquals($documentsTotal, $res['documentsTotal'][array_key_last($res['documentsTotal'])]['value']); + $this->validateDates($res['documentsTotal']); $res = $this->client->call( Client::METHOD_GET, @@ -511,19 +512,19 @@ class UsageTest extends Scope ); $res = $res['body']; - $this->assertEquals($collectionsCount, $res['collectionsCount'][array_key_last($res['collectionsCount'])]['value']); - $this->validateDates($res['collectionsCount']); + $this->assertEquals($collectionsTotal, $res['collectionsTotal'][array_key_last($res['collectionsTotal'])]['value']); + $this->validateDates($res['collectionsTotal']); - $this->assertEquals($documentsCount, $res['documentsCount'][array_key_last($res['documentsCount'])]['value']); - $this->validateDates($res['documentsCount']); + $this->assertEquals($documentsTotal, $res['documentsTotal'][array_key_last($res['documentsTotal'])]['value']); + $this->validateDates($res['documentsTotal']); $res = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/usage?range=30d', $data['consoleHeaders']); $res = $res['body']; - $this->assertEquals($documentsCount, $res['documentsCount'][array_key_last($res['documentsCount'])]['value']); - $this->validateDates($res['documentsCount']); + $this->assertEquals($documentsTotal, $res['documentsTotal'][array_key_last($res['documentsTotal'])]['value']); + $this->validateDates($res['documentsTotal']); - $data['requestsCount'] = $requestsCount; + $data['requestsTotal'] = $requestsTotal; return $data; } @@ -582,7 +583,7 @@ class UsageTest extends Scope $this->assertEquals(202, $deployment['headers']['status-code']); $this->assertNotEmpty($deployment['body']['$id']); - $this->assertEquals(true, DateTime::isValid($deployment['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($deployment['body']['$createdAt'])); $this->assertEquals('index.php', $deployment['body']['entrypoint']); // Wait for deployment to build. @@ -596,8 +597,10 @@ class UsageTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, DateTime::isValid($response['body']['$createdAt'])); - $this->assertEquals(true, DateTime::isValid($response['body']['$updatedAt'])); + + + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['$updatedAt'])); $this->assertEquals($deploymentId, $response['body']['deployment']); $execution = $this->client->call( @@ -695,20 +698,19 @@ class UsageTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(8, count($response['body'])); $this->assertEquals('30d', $response['body']['range']); - $this->assertIsArray($response['body']['deployments']); + $this->assertIsArray($response['body']['deploymentsTotal']); $this->assertIsArray($response['body']['deploymentsStorage']); - $this->assertIsArray($response['body']['builds']); - $this->assertIsArray($response['body']['buildsCompute']); - $this->assertIsArray($response['body']['executions']); - $this->assertIsArray($response['body']['executionsCompute']); + $this->assertIsArray($response['body']['buildsTotal']); + $this->assertIsArray($response['body']['buildsTime']); + $this->assertIsArray($response['body']['executionsTotal']); + $this->assertIsArray($response['body']['executionsTime']); $response = $response['body']; - $this->assertEquals($executions, $response['executions'][array_key_last($response['executions'])]['value']); - $this->validateDates($response['executions']); - - $this->assertEquals($executionTime, $response['executionsCompute'][array_key_last($response['executionsCompute'])]['value']); - $this->validateDates($response['executionsCompute']); + $this->assertEquals($executions, $response['executionsTotal'][array_key_last($response['executionsTotal'])]['value']); + $this->validateDates($response['executionsTotal']); + $this->assertEquals($executionTime, $response['executionsTime'][array_key_last($response['executionsTime'])]['value']); + $this->validateDates($response['executionsTime']); $response = $this->client->call( Client::METHOD_GET, @@ -719,28 +721,28 @@ class UsageTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(9, count($response['body'])); $this->assertEquals($response['body']['range'], '30d'); - $this->assertIsArray($response['body']['functions']); - $this->assertIsArray($response['body']['deployments']); + $this->assertIsArray($response['body']['functionsTotal']); + $this->assertIsArray($response['body']['deploymentsTotal']); $this->assertIsArray($response['body']['deploymentsStorage']); - $this->assertIsArray($response['body']['builds']); - $this->assertIsArray($response['body']['buildsCompute']); - $this->assertIsArray($response['body']['executions']); - $this->assertIsArray($response['body']['executionsCompute']); + $this->assertIsArray($response['body']['buildsTotal']); + $this->assertIsArray($response['body']['buildsTime']); + $this->assertIsArray($response['body']['executionsTotal']); + $this->assertIsArray($response['body']['executionsTime']); $response = $response['body']; - $this->assertEquals($executions, $response['executions'][array_key_last($response['executions'])]['value']); - $this->validateDates($response['executions']); - $this->assertEquals($executionTime, $response['executionsCompute'][array_key_last($response['executionsCompute'])]['value']); - $this->validateDates($response['executionsCompute']); - $this->assertGreaterThan(0, $response['buildsCompute'][array_key_last($response['buildsCompute'])]['value']); - $this->validateDates($response['buildsCompute']); + $this->assertEquals($executions, $response['executionsTotal'][array_key_last($response['executionsTotal'])]['value']); + $this->validateDates($response['executionsTotal']); + $this->assertEquals($executionTime, $response['executionsTime'][array_key_last($response['executionsTime'])]['value']); + $this->validateDates($response['executionsTime']); + $this->assertGreaterThan(0, $response['buildsTime'][array_key_last($response['buildsTime'])]['value']); + $this->validateDates($response['buildsTime']); } public function tearDown(): void { - $this->usersCount = 0; - $this->requestsCount = 0; + $this->usersTotal = 0; + $this->requestsTotal = 0; $projectId = ''; $headers = []; } diff --git a/tests/e2e/Scopes/ProjectConsole.php b/tests/e2e/Scopes/ProjectConsole.php index bc8ce4c0c..dcc4aa7c3 100644 --- a/tests/e2e/Scopes/ProjectConsole.php +++ b/tests/e2e/Scopes/ProjectConsole.php @@ -2,7 +2,7 @@ namespace Tests\E2E\Scopes; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; trait ProjectConsole { diff --git a/tests/e2e/Scopes/ProjectCustom.php b/tests/e2e/Scopes/ProjectCustom.php index f2e4e8468..4d780d04c 100644 --- a/tests/e2e/Scopes/ProjectCustom.php +++ b/tests/e2e/Scopes/ProjectCustom.php @@ -3,7 +3,7 @@ namespace Tests\E2E\Scopes; use Tests\E2E\Client; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; trait ProjectCustom { diff --git a/tests/e2e/Scopes/Scope.php b/tests/e2e/Scopes/Scope.php index 2a9f20527..939de516b 100644 --- a/tests/e2e/Scopes/Scope.php +++ b/tests/e2e/Scopes/Scope.php @@ -5,7 +5,7 @@ namespace Tests\E2E\Scopes; use Appwrite\Tests\Retryable; use Tests\E2E\Client; use PHPUnit\Framework\TestCase; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; abstract class Scope extends TestCase { diff --git a/tests/e2e/Services/Account/AccountBase.php b/tests/e2e/Services/Account/AccountBase.php index e8bf14631..880323e72 100644 --- a/tests/e2e/Services/Account/AccountBase.php +++ b/tests/e2e/Services/Account/AccountBase.php @@ -4,7 +4,7 @@ namespace Tests\E2E\Services\Account; use Appwrite\Tests\Retry; use Tests\E2E\Client; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; use Utopia\Database\DateTime; trait AccountBase diff --git a/tests/e2e/Services/Account/AccountConsoleClientTest.php b/tests/e2e/Services/Account/AccountConsoleClientTest.php index 4258004ec..c8ef193f2 100644 --- a/tests/e2e/Services/Account/AccountConsoleClientTest.php +++ b/tests/e2e/Services/Account/AccountConsoleClientTest.php @@ -6,7 +6,7 @@ use Appwrite\Extend\Exception; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\ProjectConsole; use Tests\E2E\Scopes\SideClient; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; use Utopia\Database\DateTime; use Tests\E2E\Client; diff --git a/tests/e2e/Services/Account/AccountCustomClientTest.php b/tests/e2e/Services/Account/AccountCustomClientTest.php index ea24d06bd..3c246ac52 100644 --- a/tests/e2e/Services/Account/AccountCustomClientTest.php +++ b/tests/e2e/Services/Account/AccountCustomClientTest.php @@ -9,7 +9,7 @@ use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\SideClient; use Utopia\Database\DateTime; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; use function sleep; diff --git a/tests/e2e/Services/Account/AccountCustomServerTest.php b/tests/e2e/Services/Account/AccountCustomServerTest.php index 85d140c82..143277608 100644 --- a/tests/e2e/Services/Account/AccountCustomServerTest.php +++ b/tests/e2e/Services/Account/AccountCustomServerTest.php @@ -6,7 +6,7 @@ use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideServer; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; class AccountCustomServerTest extends Scope { diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index a18332503..c81afcdd4 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -3,11 +3,10 @@ namespace Tests\E2E\Services\Databases; use Tests\E2E\Client; -use Utopia\Database\Database; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; use Utopia\Database\DateTime; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; trait DatabasesBase { diff --git a/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php b/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php index cdbeda00b..0e0ef9fe8 100644 --- a/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php @@ -6,9 +6,9 @@ use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Client; use Tests\E2E\Scopes\SideConsole; -use Utopia\Database\ID; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; class DatabasesConsoleClientTest extends Scope { diff --git a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php index 9f86bb66c..748070161 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php @@ -6,9 +6,9 @@ use Tests\E2E\Client; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\SideClient; -use Utopia\Database\ID; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; class DatabasesCustomClientTest extends Scope { diff --git a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/DatabasesCustomServerTest.php index bd4e8aa77..19a56941e 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomServerTest.php @@ -6,10 +6,9 @@ use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideServer; use Tests\E2E\Client; -use Utopia\Database\Database; -use Utopia\Database\ID; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; class DatabasesCustomServerTest extends Scope { diff --git a/tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php b/tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php index 1c15a363a..b1d197f01 100644 --- a/tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php +++ b/tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php @@ -6,9 +6,9 @@ use Tests\E2E\Client; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\SideClient; -use Utopia\Database\ID; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\Authorization; class DatabasesPermissionsGuestTest extends Scope diff --git a/tests/e2e/Services/Databases/DatabasesPermissionsMemberTest.php b/tests/e2e/Services/Databases/DatabasesPermissionsMemberTest.php index 59091956b..860fb7fb1 100644 --- a/tests/e2e/Services/Databases/DatabasesPermissionsMemberTest.php +++ b/tests/e2e/Services/Databases/DatabasesPermissionsMemberTest.php @@ -6,9 +6,9 @@ use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideClient; -use Utopia\Database\ID; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; class DatabasesPermissionsMemberTest extends Scope { diff --git a/tests/e2e/Services/Databases/DatabasesPermissionsTeamTest.php b/tests/e2e/Services/Databases/DatabasesPermissionsTeamTest.php index 07275c752..8377b9c80 100644 --- a/tests/e2e/Services/Databases/DatabasesPermissionsTeamTest.php +++ b/tests/e2e/Services/Databases/DatabasesPermissionsTeamTest.php @@ -6,9 +6,9 @@ use Tests\E2E\Client; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\SideClient; -use Utopia\Database\ID; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; class DatabasesPermissionsTeamTest extends Scope { diff --git a/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php b/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php index 9cba3719c..b473b082c 100644 --- a/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php +++ b/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php @@ -6,8 +6,8 @@ use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Client; use Tests\E2E\Scopes\SideConsole; -use Utopia\Database\ID; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Role; class FunctionsConsoleClientTest extends Scope { diff --git a/tests/e2e/Services/Functions/FunctionsCustomClientTest.php b/tests/e2e/Services/Functions/FunctionsCustomClientTest.php index 56b72e446..cd669a6b5 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomClientTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomClientTest.php @@ -7,10 +7,8 @@ use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideClient; -use Utopia\CLI\Console; -use Utopia\Database\Database; -use Utopia\Database\ID; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Role; class FunctionsCustomClientTest extends Scope { diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index e97c1412b..8635c4dd1 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -8,10 +8,8 @@ use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideServer; -use Utopia\CLI\Console; -use Utopia\Database\Database; use Utopia\Database\DateTime; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; class FunctionsCustomServerTest extends Scope { diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index 789020bf4..4f8b8bef7 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -6,11 +6,9 @@ use Appwrite\Auth\Auth; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\ProjectConsole; use Tests\E2E\Scopes\SideClient; -use Tests\E2E\Services\Projects\ProjectsBase; use Tests\E2E\Client; -use Utopia\Database\Database; use Utopia\Database\DateTime; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; class ProjectsConsoleClientTest extends Scope { diff --git a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php index 500b3d48b..cd2fb6f13 100644 --- a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php @@ -8,9 +8,9 @@ use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\SideConsole; use Tests\E2E\Services\Functions\FunctionsBase; -use Utopia\Database\ID; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; class RealtimeConsoleClientTest extends Scope { diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index f4b959274..d4c8f5342 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -8,9 +8,9 @@ use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\SideClient; use Utopia\CLI\Console; -use Utopia\Database\ID; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; use WebSocket\ConnectionException; class RealtimeCustomClientTest extends Scope diff --git a/tests/e2e/Services/Storage/StorageBase.php b/tests/e2e/Services/Storage/StorageBase.php index b4c28b0fa..359989e11 100644 --- a/tests/e2e/Services/Storage/StorageBase.php +++ b/tests/e2e/Services/Storage/StorageBase.php @@ -5,9 +5,9 @@ namespace Tests\E2E\Services\Storage; use CURLFile; use Tests\E2E\Client; use Utopia\Database\DateTime; -use Utopia\Database\ID; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; trait StorageBase { diff --git a/tests/e2e/Services/Storage/StorageConsoleClientTest.php b/tests/e2e/Services/Storage/StorageConsoleClientTest.php index e24ac524a..521f022cb 100644 --- a/tests/e2e/Services/Storage/StorageConsoleClientTest.php +++ b/tests/e2e/Services/Storage/StorageConsoleClientTest.php @@ -6,7 +6,7 @@ use Tests\E2E\Client; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\SideConsole; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; class StorageConsoleClientTest extends Scope { @@ -97,7 +97,7 @@ class StorageConsoleClientTest extends Scope $this->assertEquals($response['headers']['status-code'], 200); $this->assertEquals(count($response['body']), 3); $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['filesCount']); + $this->assertIsArray($response['body']['filesTotal']); $this->assertIsArray($response['body']['filesStorage']); } } diff --git a/tests/e2e/Services/Storage/StorageCustomClientTest.php b/tests/e2e/Services/Storage/StorageCustomClientTest.php index fdb158ae5..8af9f7b3e 100644 --- a/tests/e2e/Services/Storage/StorageCustomClientTest.php +++ b/tests/e2e/Services/Storage/StorageCustomClientTest.php @@ -13,10 +13,9 @@ use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\SideClient; use Utopia\Database\DateTime; -use Utopia\Database\ID; -use Utopia\Database\Permission; -use Utopia\Database\Role; -use Utopia\Database\Validator\Authorization; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; class StorageCustomClientTest extends Scope { diff --git a/tests/e2e/Services/Storage/StorageCustomServerTest.php b/tests/e2e/Services/Storage/StorageCustomServerTest.php index ac03f2b83..2395e1d8f 100644 --- a/tests/e2e/Services/Storage/StorageCustomServerTest.php +++ b/tests/e2e/Services/Storage/StorageCustomServerTest.php @@ -7,7 +7,7 @@ use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideServer; use Utopia\Database\DateTime; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; class StorageCustomServerTest extends Scope { diff --git a/tests/e2e/Services/Teams/TeamsBase.php b/tests/e2e/Services/Teams/TeamsBase.php index 854a04150..7b4e77482 100644 --- a/tests/e2e/Services/Teams/TeamsBase.php +++ b/tests/e2e/Services/Teams/TeamsBase.php @@ -3,9 +3,8 @@ namespace Tests\E2E\Services\Teams; use Tests\E2E\Client; -use Utopia\Database\Database; use Utopia\Database\DateTime; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; trait TeamsBase { diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index 788626b10..0eb578e32 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -4,7 +4,7 @@ namespace Tests\E2E\Services\Teams; use Tests\E2E\Client; use Utopia\Database\DateTime; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; trait TeamsBaseClient { diff --git a/tests/e2e/Services/Teams/TeamsConsoleClientTest.php b/tests/e2e/Services/Teams/TeamsConsoleClientTest.php index 0f32425c9..e86c18a8e 100644 --- a/tests/e2e/Services/Teams/TeamsConsoleClientTest.php +++ b/tests/e2e/Services/Teams/TeamsConsoleClientTest.php @@ -6,7 +6,7 @@ use Tests\E2E\Client; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\ProjectConsole; use Tests\E2E\Scopes\SideClient; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; class TeamsConsoleClientTest extends Scope { diff --git a/tests/e2e/Services/Users/UsersBase.php b/tests/e2e/Services/Users/UsersBase.php index ac3b116b3..75cce5653 100644 --- a/tests/e2e/Services/Users/UsersBase.php +++ b/tests/e2e/Services/Users/UsersBase.php @@ -4,7 +4,7 @@ namespace Tests\E2E\Services\Users; use Appwrite\Tests\Retry; use Tests\E2E\Client; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; trait UsersBase { diff --git a/tests/e2e/Services/Webhooks/WebhooksBase.php b/tests/e2e/Services/Webhooks/WebhooksBase.php index bb7edfdb4..d3d700a22 100644 --- a/tests/e2e/Services/Webhooks/WebhooksBase.php +++ b/tests/e2e/Services/Webhooks/WebhooksBase.php @@ -6,9 +6,9 @@ use Appwrite\Tests\Retry; use CURLFile; use Tests\E2E\Client; use Utopia\Database\DateTime; -use Utopia\Database\ID; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; trait WebhooksBase { diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php index 9e2632293..1a49b4b3f 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php @@ -8,7 +8,7 @@ use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\SideClient; use Utopia\Database\DateTime; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; class WebhooksCustomClientTest extends Scope { diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index f2f4b2726..51f5ef253 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -9,9 +9,9 @@ use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideServer; use Utopia\CLI\Console; use Utopia\Database\DateTime; -use Utopia\Database\ID; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; class WebhooksCustomServerTest extends Scope { diff --git a/tests/unit/Auth/AuthTest.php b/tests/unit/Auth/AuthTest.php index a4ed5740c..c3c8e904d 100644 --- a/tests/unit/Auth/AuthTest.php +++ b/tests/unit/Auth/AuthTest.php @@ -5,11 +5,10 @@ namespace Tests\Unit\Auth; use Appwrite\Auth\Auth; use Utopia\Database\DateTime; use Utopia\Database\Document; -use Utopia\Database\ID; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\Authorization; use PHPUnit\Framework\TestCase; -use Utopia\Database\Database; use Utopia\Database\Validator\Roles; class AuthTest extends TestCase diff --git a/tests/unit/Messaging/MessagingChannelsTest.php b/tests/unit/Messaging/MessagingChannelsTest.php index 392f6d56f..6fe7dda71 100644 --- a/tests/unit/Messaging/MessagingChannelsTest.php +++ b/tests/unit/Messaging/MessagingChannelsTest.php @@ -6,8 +6,8 @@ use Appwrite\Auth\Auth; use Utopia\Database\Document; use Appwrite\Messaging\Adapter\Realtime; use PHPUnit\Framework\TestCase; -use Utopia\Database\ID; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Role; class MessagingChannelsTest extends TestCase { diff --git a/tests/unit/Messaging/MessagingGuestTest.php b/tests/unit/Messaging/MessagingGuestTest.php index d8ed58ad4..1aaa1febc 100644 --- a/tests/unit/Messaging/MessagingGuestTest.php +++ b/tests/unit/Messaging/MessagingGuestTest.php @@ -4,8 +4,8 @@ namespace Tests\Unit\Messaging; use Appwrite\Messaging\Adapter\Realtime; use PHPUnit\Framework\TestCase; -use Utopia\Database\ID; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Role; class MessagingGuestTest extends TestCase { diff --git a/tests/unit/Messaging/MessagingTest.php b/tests/unit/Messaging/MessagingTest.php index 0b7baf263..c2e397194 100644 --- a/tests/unit/Messaging/MessagingTest.php +++ b/tests/unit/Messaging/MessagingTest.php @@ -5,9 +5,9 @@ namespace Tests\Unit\Messaging; use Utopia\Database\Document; use Appwrite\Messaging\Adapter\Realtime; use PHPUnit\Framework\TestCase; -use Utopia\Database\ID; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\ID; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; class MessagingTest extends TestCase { diff --git a/tests/unit/Network/Validators/OriginTest.php b/tests/unit/Network/Validators/OriginTest.php index 2392ae4cf..30d18ecaa 100644 --- a/tests/unit/Network/Validators/OriginTest.php +++ b/tests/unit/Network/Validators/OriginTest.php @@ -4,7 +4,7 @@ namespace Tests\Unit\Network\Validators; use Appwrite\Network\Validator\Origin; use PHPUnit\Framework\TestCase; -use Utopia\Database\ID; +use Utopia\Database\Helpers\ID; class OriginTest extends TestCase { diff --git a/tests/unit/Utopia/Response/Filters/V15Test.php b/tests/unit/Utopia/Response/Filters/V15Test.php index ce7870483..fc38e5320 100644 --- a/tests/unit/Utopia/Response/Filters/V15Test.php +++ b/tests/unit/Utopia/Response/Filters/V15Test.php @@ -4,10 +4,9 @@ namespace Tests\Unit\Utopia\Response\Filters; use Appwrite\Utopia\Response\Filters\V15; use Appwrite\Utopia\Response; -use Utopia\Database\Permission; -use Utopia\Database\Role; +use Utopia\Database\Helpers\Permission; +use Utopia\Database\Helpers\Role; use PHPUnit\Framework\TestCase; -use stdClass; class V15Test extends TestCase { From 8d795ef48323760818cc6fc7cb70af8a1815a0c9 Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 5 Feb 2023 22:39:41 +0200 Subject: [PATCH 74/94] addressing comments --- tests/e2e/Services/Account/AccountBase.php | 27 ++++++++++--------- .../Account/AccountConsoleClientTest.php | 5 ++-- .../Account/AccountCustomClientTest.php | 13 ++++----- .../e2e/Services/Databases/DatabasesBase.php | 5 ++-- .../Functions/FunctionsCustomServerTest.php | 21 ++++++++------- tests/e2e/Services/Storage/StorageBase.php | 11 ++++---- .../Storage/StorageCustomClientTest.php | 21 ++++++++------- .../Storage/StorageCustomServerTest.php | 5 ++-- tests/e2e/Services/Teams/TeamsBase.php | 15 ++++++----- tests/e2e/Services/Teams/TeamsBaseClient.php | 11 ++++---- tests/e2e/Services/Teams/TeamsBaseServer.php | 9 ++++--- tests/e2e/Services/Webhooks/WebhooksBase.php | 17 ++++++------ .../Webhooks/WebhooksCustomClientTest.php | 19 ++++++------- .../Webhooks/WebhooksCustomServerTest.php | 7 ++--- 14 files changed, 100 insertions(+), 86 deletions(-) diff --git a/tests/e2e/Services/Account/AccountBase.php b/tests/e2e/Services/Account/AccountBase.php index 880323e72..967105ecd 100644 --- a/tests/e2e/Services/Account/AccountBase.php +++ b/tests/e2e/Services/Account/AccountBase.php @@ -6,6 +6,7 @@ use Appwrite\Tests\Retry; use Tests\E2E\Client; use Utopia\Database\Helpers\ID; use Utopia\Database\DateTime; +use Utopia\Database\Validator\DatetimeValidator; trait AccountBase { @@ -34,7 +35,7 @@ trait AccountBase $this->assertEquals($response['headers']['status-code'], 201); $this->assertNotEmpty($response['body']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, DateTime::isValid($response['body']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['registration'])); $this->assertEquals($response['body']['email'], $email); $this->assertEquals($response['body']['name'], $name); @@ -198,7 +199,7 @@ trait AccountBase $this->assertEquals($response['headers']['status-code'], 200); $this->assertNotEmpty($response['body']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, DateTime::isValid($response['body']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['registration'])); $this->assertEquals($response['body']['email'], $email); $this->assertEquals($response['body']['name'], $name); @@ -343,7 +344,7 @@ trait AccountBase $this->assertIsNumeric($response['body']['total']); $this->assertContains($response['body']['logs'][1]['event'], ["session.create"]); $this->assertEquals($response['body']['logs'][1]['ip'], filter_var($response['body']['logs'][1]['ip'], FILTER_VALIDATE_IP)); - $this->assertEquals(true, DateTime::isValid($response['body']['logs'][1]['time'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['logs'][1]['time'])); $this->assertEquals('Windows', $response['body']['logs'][1]['osName']); $this->assertEquals('WIN', $response['body']['logs'][1]['osCode']); @@ -365,7 +366,7 @@ trait AccountBase $this->assertContains($response['body']['logs'][2]['event'], ["user.create"]); $this->assertEquals($response['body']['logs'][2]['ip'], filter_var($response['body']['logs'][2]['ip'], FILTER_VALIDATE_IP)); - $this->assertEquals(true, DateTime::isValid($response['body']['logs'][2]['time'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['logs'][2]['time'])); $this->assertEquals('Windows', $response['body']['logs'][2]['osName']); $this->assertEquals('WIN', $response['body']['logs'][2]['osCode']); @@ -476,7 +477,7 @@ trait AccountBase $this->assertIsArray($response['body']); $this->assertNotEmpty($response['body']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, DateTime::isValid($response['body']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['registration'])); $this->assertEquals($response['body']['email'], $email); $this->assertEquals($response['body']['name'], $newName); @@ -543,7 +544,7 @@ trait AccountBase $this->assertIsArray($response['body']); $this->assertNotEmpty($response['body']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, DateTime::isValid($response['body']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['registration'])); $this->assertEquals($response['body']['email'], $email); $response = $this->client->call(Client::METHOD_POST, '/account/sessions/email', array_merge([ @@ -633,7 +634,7 @@ trait AccountBase $this->assertIsArray($response['body']); $this->assertNotEmpty($response['body']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, DateTime::isValid($response['body']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['registration'])); $this->assertEquals($response['body']['email'], $newEmail); /** @@ -675,7 +676,7 @@ trait AccountBase $this->assertEquals($response['headers']['status-code'], 201); $this->assertNotEmpty($response['body']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, DateTime::isValid($response['body']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['registration'])); $this->assertEquals($response['body']['email'], $data['email']); $this->assertEquals($response['body']['name'], $data['name']); @@ -817,7 +818,7 @@ trait AccountBase $this->assertEquals(201, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); $this->assertEmpty($response['body']['secret']); - $this->assertEquals(true, DateTime::isValid($response['body']['expire'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['expire'])); $lastEmail = $this->getLastEmail(); @@ -1119,7 +1120,7 @@ trait AccountBase $this->assertEquals(201, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); $this->assertEmpty($response['body']['secret']); - $this->assertEquals(true, DateTime::isValid($response['body']['expire'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['expire'])); $lastEmail = $this->getLastEmail(); @@ -1273,7 +1274,7 @@ trait AccountBase $this->assertEquals(201, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); $this->assertEmpty($response['body']['secret']); - $this->assertEquals(true, DateTime::isValid($response['body']['expire'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['expire'])); $userId = $response['body']['userId']; @@ -1379,7 +1380,7 @@ trait AccountBase $this->assertEquals($response['headers']['status-code'], 200); $this->assertNotEmpty($response['body']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, DateTime::isValid($response['body']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['registration'])); $this->assertEquals($response['body']['email'], $email); $this->assertTrue($response['body']['emailVerification']); @@ -1439,7 +1440,7 @@ trait AccountBase $this->assertIsArray($response['body']); $this->assertNotEmpty($response['body']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, DateTime::isValid($response['body']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['registration'])); $this->assertEquals($response['body']['email'], $email); $response = $this->client->call(Client::METHOD_POST, '/account/sessions/email', array_merge([ diff --git a/tests/e2e/Services/Account/AccountConsoleClientTest.php b/tests/e2e/Services/Account/AccountConsoleClientTest.php index c8ef193f2..027369d27 100644 --- a/tests/e2e/Services/Account/AccountConsoleClientTest.php +++ b/tests/e2e/Services/Account/AccountConsoleClientTest.php @@ -9,6 +9,7 @@ use Tests\E2E\Scopes\SideClient; use Utopia\Database\Helpers\ID; use Utopia\Database\DateTime; use Tests\E2E\Client; +use Utopia\Database\Validator\DatetimeValidator; class AccountConsoleClientTest extends Scope { @@ -72,7 +73,7 @@ class AccountConsoleClientTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); $this->assertNotEmpty($response['body']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, DateTime::isValid($response['body']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['registration'])); $this->assertEquals($response['body']['email'], $email); $this->assertEquals($response['body']['name'], $name); @@ -92,7 +93,7 @@ class AccountConsoleClientTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); $this->assertNotEmpty($response['body']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, DateTime::isValid($response['body']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['registration'])); $this->assertEquals($response['body']['email'], $email); $this->assertEquals($response['body']['name'], $name); } diff --git a/tests/e2e/Services/Account/AccountCustomClientTest.php b/tests/e2e/Services/Account/AccountCustomClientTest.php index 3c246ac52..3cbb9a4d2 100644 --- a/tests/e2e/Services/Account/AccountCustomClientTest.php +++ b/tests/e2e/Services/Account/AccountCustomClientTest.php @@ -11,6 +11,7 @@ use Tests\E2E\Scopes\SideClient; use Utopia\Database\DateTime; use Utopia\Database\Helpers\ID; +use Utopia\Database\Validator\DatetimeValidator; use function sleep; class AccountCustomClientTest extends Scope @@ -475,7 +476,7 @@ class AccountCustomClientTest extends Scope $this->assertIsArray($response['body']); $this->assertNotEmpty($response['body']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, DateTime::isValid($response['body']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['registration'])); $this->assertEquals($response['body']['email'], $email); $response = $this->client->call(Client::METHOD_POST, '/account/sessions/email', array_merge([ @@ -726,7 +727,7 @@ class AccountCustomClientTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); $this->assertEmpty($response['body']['secret']); - $this->assertEquals(true, DateTime::isValid($response['body']['expire'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['expire'])); $userId = $response['body']['userId']; @@ -826,7 +827,7 @@ class AccountCustomClientTest extends Scope $this->assertEquals($response['headers']['status-code'], 200); $this->assertNotEmpty($response['body']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, DateTime::isValid($response['body']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['registration'])); $this->assertEquals($response['body']['phone'], $number); $this->assertTrue($response['body']['phoneVerification']); @@ -877,7 +878,7 @@ class AccountCustomClientTest extends Scope $this->assertIsArray($response['body']); $this->assertNotEmpty($response['body']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, DateTime::isValid($response['body']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['registration'])); $this->assertEquals($response['body']['email'], $email); $response = $this->client->call(Client::METHOD_POST, '/account/sessions/email', array_merge([ @@ -919,7 +920,7 @@ class AccountCustomClientTest extends Scope $this->assertIsArray($response['body']); $this->assertNotEmpty($response['body']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, DateTime::isValid($response['body']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['registration'])); $this->assertEquals($response['body']['phone'], $newPhone); /** @@ -968,7 +969,7 @@ class AccountCustomClientTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); $this->assertEmpty($response['body']['secret']); - $this->assertEquals(true, DateTime::isValid($response['body']['expire'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['expire'])); \sleep(2); diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index c81afcdd4..5bd427979 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -7,6 +7,7 @@ use Utopia\Database\Helpers\ID; use Utopia\Database\DateTime; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; +use Utopia\Database\Validator\DatetimeValidator; trait DatabasesBase { @@ -1531,8 +1532,8 @@ trait DatabasesBase $this->assertEquals($databaseId, $document['body']['$databaseId']); $this->assertEquals($document['body']['title'], 'Thor: Ragnaroc'); $this->assertEquals($document['body']['releaseYear'], 2017); - $this->assertEquals(true, DateTime::isValid($document['body']['$createdAt'])); - $this->assertEquals(true, DateTime::isValid($document['body']['birthDay'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($document['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($document['body']['birthDay'])); $this->assertContains(Permission::read(Role::user($this->getUser()['$id'])), $document['body']['$permissions']); $this->assertContains(Permission::update(Role::user($this->getUser()['$id'])), $document['body']['$permissions']); $this->assertContains(Permission::delete(Role::user($this->getUser()['$id'])), $document['body']['$permissions']); diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index 8635c4dd1..0229ccbf5 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -10,6 +10,7 @@ use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideServer; use Utopia\Database\DateTime; use Utopia\Database\Helpers\ID; +use Utopia\Database\Validator\DatetimeValidator; class FunctionsCustomServerTest extends Scope { @@ -43,8 +44,8 @@ class FunctionsCustomServerTest extends Scope $this->assertNotEmpty($response1['body']['$id']); $this->assertEquals('Test', $response1['body']['name']); $this->assertEquals('php-8.0', $response1['body']['runtime']); - $this->assertEquals(true, DateTime::isValid($response1['body']['$createdAt'])); - $this->assertEquals(true, DateTime::isValid($response1['body']['$updatedAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response1['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response1['body']['$updatedAt'])); $this->assertEquals('', $response1['body']['deployment']); $this->assertEquals([ 'users.*.create', @@ -326,8 +327,8 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(200, $response1['headers']['status-code']); $this->assertNotEmpty($response1['body']['$id']); $this->assertEquals('Test1', $response1['body']['name']); - $this->assertEquals(true, DateTime::isValid($response1['body']['$createdAt'])); - $this->assertEquals(true, DateTime::isValid($response1['body']['$updatedAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response1['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response1['body']['$updatedAt'])); $this->assertEquals('', $response1['body']['deployment']); $this->assertEquals([ 'users.*.update.name', @@ -367,7 +368,7 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(202, $deployment['headers']['status-code']); $this->assertNotEmpty($deployment['body']['$id']); - $this->assertEquals(true, DateTime::isValid($deployment['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($deployment['body']['$createdAt'])); $this->assertEquals('index.php', $deployment['body']['entrypoint']); // Wait for deployment to build. @@ -416,7 +417,7 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(202, $largeTag['headers']['status-code']); $this->assertNotEmpty($largeTag['body']['$id']); - $this->assertEquals(true, DateTime::isValid($largeTag['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($largeTag['body']['$createdAt'])); $this->assertEquals('index.php', $largeTag['body']['entrypoint']); $this->assertGreaterThan(10000, $largeTag['body']['size']); @@ -438,8 +439,8 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, DateTime::isValid($response['body']['$createdAt'])); - $this->assertEquals(true, DateTime::isValid($response['body']['$updatedAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['$updatedAt'])); $this->assertEquals($data['deploymentId'], $response['body']['deployment']); /** @@ -604,7 +605,7 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(202, $execution['headers']['status-code']); $this->assertNotEmpty($execution['body']['$id']); $this->assertNotEmpty($execution['body']['functionId']); - $this->assertEquals(true, DateTime::isValid($execution['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($execution['body']['$createdAt'])); $this->assertEquals($data['functionId'], $execution['body']['functionId']); $this->assertEquals('waiting', $execution['body']['status']); $this->assertEquals(0, $execution['body']['statusCode']); @@ -621,7 +622,7 @@ class FunctionsCustomServerTest extends Scope $this->assertNotEmpty($execution['body']['$id']); $this->assertNotEmpty($execution['body']['functionId']); - $this->assertEquals(true, DateTime::isValid($execution['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($execution['body']['$createdAt'])); $this->assertEquals($data['functionId'], $execution['body']['functionId']); $this->assertEquals('completed', $execution['body']['status']); $this->assertEquals(200, $execution['body']['statusCode']); diff --git a/tests/e2e/Services/Storage/StorageBase.php b/tests/e2e/Services/Storage/StorageBase.php index 359989e11..7063ad5a7 100644 --- a/tests/e2e/Services/Storage/StorageBase.php +++ b/tests/e2e/Services/Storage/StorageBase.php @@ -8,6 +8,7 @@ use Utopia\Database\DateTime; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; +use Utopia\Database\Validator\DatetimeValidator; trait StorageBase { @@ -52,7 +53,7 @@ trait StorageBase ]); $this->assertEquals(201, $file['headers']['status-code']); $this->assertNotEmpty($file['body']['$id']); - $this->assertEquals(true, DateTime::isValid($file['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($file['body']['$createdAt'])); $this->assertEquals('logo.png', $file['body']['name']); $this->assertEquals('image/png', $file['body']['mimeType']); $this->assertEquals(47218, $file['body']['sizeOriginal']); @@ -120,7 +121,7 @@ trait StorageBase $this->assertEquals(201, $largeFile['headers']['status-code']); $this->assertNotEmpty($largeFile['body']['$id']); - $this->assertEquals(true, DateTime::isValid($largeFile['body']['$createdAt'])); + $this->assertEquals(true, $largeFile['body']['$createdAt']); $this->assertEquals('large-file.mp4', $largeFile['body']['name']); $this->assertEquals('video/mp4', $largeFile['body']['mimeType']); $this->assertEquals($totalSize, $largeFile['body']['sizeOriginal']); @@ -283,7 +284,7 @@ trait StorageBase ]); $this->assertEquals(201, $file['headers']['status-code']); $this->assertNotEmpty($file['body']['$id']); - $this->assertEquals(true, DateTime::isValid($file['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($file['body']['$createdAt'])); $this->assertEquals('logo.png', $file['body']['name']); $this->assertEquals('image/png', $file['body']['mimeType']); $this->assertEquals(47218, $file['body']['sizeOriginal']); @@ -373,7 +374,7 @@ trait StorageBase $this->assertEquals(200, $file1['headers']['status-code']); $this->assertNotEmpty($file1['body']['$id']); - $this->assertEquals(true, DateTime::isValid($file1['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($file1['body']['$createdAt'])); $this->assertEquals('logo.png', $file1['body']['name']); $this->assertEquals('image/png', $file1['body']['mimeType']); $this->assertEquals(47218, $file1['body']['sizeOriginal']); @@ -712,7 +713,7 @@ trait StorageBase $this->assertEquals(200, $file['headers']['status-code']); $this->assertNotEmpty($file['body']['$id']); - $this->assertEquals(true, DateTime::isValid($file['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($file['body']['$createdAt'])); $this->assertEquals('logo.png', $file['body']['name']); $this->assertEquals('image/png', $file['body']['mimeType']); $this->assertEquals(47218, $file['body']['sizeOriginal']); diff --git a/tests/e2e/Services/Storage/StorageCustomClientTest.php b/tests/e2e/Services/Storage/StorageCustomClientTest.php index 8af9f7b3e..a11f736b2 100644 --- a/tests/e2e/Services/Storage/StorageCustomClientTest.php +++ b/tests/e2e/Services/Storage/StorageCustomClientTest.php @@ -16,6 +16,7 @@ use Utopia\Database\DateTime; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; +use Utopia\Database\Validator\DatetimeValidator; class StorageCustomClientTest extends Scope { @@ -62,7 +63,7 @@ class StorageCustomClientTest extends Scope $fileId = $file['body']['$id']; $this->assertEquals($file['headers']['status-code'], 201); $this->assertNotEmpty($fileId); - $this->assertEquals(true, DateTime::isValid($file['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($file['body']['$createdAt'])); $this->assertEquals('permissions.png', $file['body']['name']); $this->assertEquals('image/png', $file['body']['mimeType']); $this->assertEquals(47218, $file['body']['sizeOriginal']); @@ -158,7 +159,7 @@ class StorageCustomClientTest extends Scope $fileId = $file['body']['$id']; $this->assertEquals($file['headers']['status-code'], 201); $this->assertNotEmpty($fileId); - $this->assertEquals(true, DateTime::isValid($file['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($file['body']['$createdAt'])); $this->assertEquals('permissions.png', $file['body']['name']); $this->assertEquals('image/png', $file['body']['mimeType']); $this->assertEquals(47218, $file['body']['sizeOriginal']); @@ -244,7 +245,7 @@ class StorageCustomClientTest extends Scope $fileId = $file['body']['$id']; $this->assertEquals($file['headers']['status-code'], 201); $this->assertNotEmpty($fileId); - $this->assertEquals(true, DateTime::isValid($file['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($file['body']['$createdAt'])); $this->assertEquals('permissions.png', $file['body']['name']); $this->assertEquals('image/png', $file['body']['mimeType']); $this->assertEquals(47218, $file['body']['sizeOriginal']); @@ -369,7 +370,7 @@ class StorageCustomClientTest extends Scope $fileId = $file['body']['$id']; $this->assertEquals($file['headers']['status-code'], 201); $this->assertNotEmpty($fileId); - $this->assertEquals(true, DateTime::isValid($file['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($file['body']['$createdAt'])); $this->assertEquals('permissions.png', $file['body']['name']); $this->assertEquals('image/png', $file['body']['mimeType']); $this->assertEquals(47218, $file['body']['sizeOriginal']); @@ -547,7 +548,7 @@ class StorageCustomClientTest extends Scope $fileId = $file['body']['$id']; $this->assertEquals($file['headers']['status-code'], 201); $this->assertNotEmpty($fileId); - $this->assertEquals(true, DateTime::isValid($file['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($file['body']['$createdAt'])); $this->assertEquals('permissions.png', $file['body']['name']); $this->assertEquals('image/png', $file['body']['mimeType']); $this->assertEquals(47218, $file['body']['sizeOriginal']); @@ -709,7 +710,7 @@ class StorageCustomClientTest extends Scope $fileId = $file1['body']['$id']; $this->assertEquals($file1['headers']['status-code'], 201); $this->assertNotEmpty($fileId); - $this->assertEquals(true, DateTime::isValid($file1['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($file1['body']['$createdAt'])); $this->assertEquals('permissions.png', $file1['body']['name']); $this->assertEquals('image/png', $file1['body']['mimeType']); $this->assertEquals(47218, $file1['body']['sizeOriginal']); @@ -798,7 +799,7 @@ class StorageCustomClientTest extends Scope $fileId = $file1['body']['$id']; $this->assertEquals($file1['headers']['status-code'], 201); $this->assertNotEmpty($fileId); - $this->assertEquals(true, DateTime::isValid($file1['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($file1['body']['$createdAt'])); $this->assertEquals('permissions.png', $file1['body']['name']); $this->assertEquals('image/png', $file1['body']['mimeType']); $this->assertEquals(47218, $file1['body']['sizeOriginal']); @@ -887,7 +888,7 @@ class StorageCustomClientTest extends Scope $fileId = $file1['body']['$id']; $this->assertEquals($file1['headers']['status-code'], 201); $this->assertNotEmpty($fileId); - $this->assertEquals(true, DateTime::isValid($file1['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($file1['body']['$createdAt'])); $this->assertEquals('permissions.png', $file1['body']['name']); $this->assertEquals('image/png', $file1['body']['mimeType']); $this->assertEquals(47218, $file1['body']['sizeOriginal']); @@ -1026,7 +1027,7 @@ class StorageCustomClientTest extends Scope $fileId = $file['body']['$id']; $this->assertEquals($file['headers']['status-code'], 201); $this->assertNotEmpty($fileId); - $this->assertEquals(true, DateTime::isValid($file['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($file['body']['$createdAt'])); $this->assertEquals('permissions.png', $file['body']['name']); $this->assertEquals('image/png', $file['body']['mimeType']); $this->assertEquals(47218, $file['body']['sizeOriginal']); @@ -1261,7 +1262,7 @@ class StorageCustomClientTest extends Scope $this->assertContains(Permission::read(Role::user($this->getUser()['$id'])), $file['body']['$permissions']); $this->assertContains(Permission::update(Role::user($this->getUser()['$id'])), $file['body']['$permissions']); $this->assertContains(Permission::delete(Role::user($this->getUser()['$id'])), $file['body']['$permissions']); - $this->assertEquals(true, DateTime::isValid($file['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($file['body']['$createdAt'])); $this->assertEquals('permissions.png', $file['body']['name']); $this->assertEquals('image/png', $file['body']['mimeType']); $this->assertEquals(47218, $file['body']['sizeOriginal']); diff --git a/tests/e2e/Services/Storage/StorageCustomServerTest.php b/tests/e2e/Services/Storage/StorageCustomServerTest.php index 2395e1d8f..a541e30d4 100644 --- a/tests/e2e/Services/Storage/StorageCustomServerTest.php +++ b/tests/e2e/Services/Storage/StorageCustomServerTest.php @@ -8,6 +8,7 @@ use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideServer; use Utopia\Database\DateTime; use Utopia\Database\Helpers\ID; +use Utopia\Database\Validator\DatetimeValidator; class StorageCustomServerTest extends Scope { @@ -30,7 +31,7 @@ class StorageCustomServerTest extends Scope ]); $this->assertEquals(201, $bucket['headers']['status-code']); $this->assertNotEmpty($bucket['body']['$id']); - $this->assertEquals(true, DateTime::isValid($bucket['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($bucket['body']['$createdAt'])); $this->assertIsArray($bucket['body']['$permissions']); $this->assertIsArray($bucket['body']['allowedFileExtensions']); $this->assertEquals('Test Bucket', $bucket['body']['name']); @@ -228,7 +229,7 @@ class StorageCustomServerTest extends Scope ]); $this->assertEquals(200, $bucket['headers']['status-code']); $this->assertNotEmpty($bucket['body']['$id']); - $this->assertEquals(true, DateTime::isValid($bucket['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($bucket['body']['$createdAt'])); $this->assertIsArray($bucket['body']['$permissions']); $this->assertIsArray($bucket['body']['allowedFileExtensions']); $this->assertEquals('Test Bucket Updated', $bucket['body']['name']); diff --git a/tests/e2e/Services/Teams/TeamsBase.php b/tests/e2e/Services/Teams/TeamsBase.php index 7b4e77482..e6d03c6e4 100644 --- a/tests/e2e/Services/Teams/TeamsBase.php +++ b/tests/e2e/Services/Teams/TeamsBase.php @@ -5,6 +5,7 @@ namespace Tests\E2E\Services\Teams; use Tests\E2E\Client; use Utopia\Database\DateTime; use Utopia\Database\Helpers\ID; +use Utopia\Database\Validator\DatetimeValidator; trait TeamsBase { @@ -27,7 +28,7 @@ trait TeamsBase $this->assertEquals('Arsenal', $response1['body']['name']); $this->assertGreaterThan(-1, $response1['body']['total']); $this->assertIsInt($response1['body']['total']); - $this->assertEquals(true, DateTime::isValid($response1['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response1['body']['$createdAt'])); $teamUid = $response1['body']['$id']; $teamName = $response1['body']['name']; @@ -47,7 +48,7 @@ trait TeamsBase $this->assertEquals('Manchester United', $response2['body']['name']); $this->assertGreaterThan(-1, $response2['body']['total']); $this->assertIsInt($response2['body']['total']); - $this->assertEquals(true, DateTime::isValid($response2['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response2['body']['$createdAt'])); $response3 = $this->client->call(Client::METHOD_POST, '/teams', array_merge([ 'content-type' => 'application/json', @@ -62,7 +63,7 @@ trait TeamsBase $this->assertEquals('Newcastle', $response3['body']['name']); $this->assertGreaterThan(-1, $response3['body']['total']); $this->assertIsInt($response3['body']['total']); - $this->assertEquals(true, DateTime::isValid($response3['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response3['body']['$createdAt'])); /** * Test for FAILURE */ @@ -97,7 +98,7 @@ trait TeamsBase $this->assertEquals('Arsenal', $response['body']['name']); $this->assertGreaterThan(-1, $response['body']['total']); $this->assertIsInt($response['body']['total']); - $this->assertEquals(true, DateTime::isValid($response['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['$createdAt'])); /** * Test for FAILURE @@ -274,7 +275,7 @@ trait TeamsBase $this->assertEquals('Demo', $response['body']['name']); $this->assertGreaterThan(-1, $response['body']['total']); $this->assertIsInt($response['body']['total']); - $this->assertEquals(true, DateTime::isValid($response['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['$createdAt'])); $response = $this->client->call(Client::METHOD_PUT, '/teams/' . $response['body']['$id'], array_merge([ 'content-type' => 'application/json', @@ -289,7 +290,7 @@ trait TeamsBase $this->assertEquals('Demo New', $response['body']['name']); $this->assertGreaterThan(-1, $response['body']['total']); $this->assertIsInt($response['body']['total']); - $this->assertEquals(true, DateTime::isValid($response['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['$createdAt'])); /** * Test for FAILURE @@ -325,7 +326,7 @@ trait TeamsBase $this->assertEquals('Demo', $response['body']['name']); $this->assertGreaterThan(-1, $response['body']['total']); $this->assertIsInt($response['body']['total']); - $this->assertEquals(true, DateTime::isValid($response['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['$createdAt'])); $response = $this->client->call(Client::METHOD_DELETE, '/teams/' . $teamUid, array_merge([ 'content-type' => 'application/json', diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index 0eb578e32..e74a47c3f 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -5,6 +5,7 @@ namespace Tests\E2E\Services\Teams; use Tests\E2E\Client; use Utopia\Database\DateTime; use Utopia\Database\Helpers\ID; +use Utopia\Database\Validator\DatetimeValidator; trait TeamsBaseClient { @@ -150,7 +151,7 @@ trait TeamsBaseClient $this->assertNotEmpty($response['body']['teamId']); $this->assertNotEmpty($response['body']['teamName']); $this->assertCount(2, $response['body']['roles']); - $this->assertEquals(false, DateTime::isValid($response['body']['joined'])); // is null in DB + $this->assertEquals(false, (new DatetimeValidator())->isValid($response['body']['joined'])); // is null in DB $this->assertEquals(false, $response['body']['confirm']); /** @@ -203,7 +204,7 @@ trait TeamsBaseClient $this->assertNotEmpty($response['body']['teamId']); $this->assertNotEmpty($response['body']['teamName']); $this->assertCount(2, $response['body']['roles']); - $this->assertEquals(false, DateTime::isValid($response['body']['joined'])); // is null in DB + $this->assertEquals(false, (new DatetimeValidator())->isValid($response['body']['joined'])); // is null in DB $this->assertEquals(false, $response['body']['confirm']); $lastEmail = $this->getLastEmail(); @@ -337,7 +338,7 @@ trait TeamsBaseClient $this->assertNotEmpty($response['body']['userId']); $this->assertNotEmpty($response['body']['teamId']); $this->assertCount(2, $response['body']['roles']); - $this->assertEquals(true, DateTime::isValid($response['body']['joined'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['joined'])); $this->assertEquals(true, $response['body']['confirm']); $session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_' . $this->getProject()['$id']]; $data['session'] = $session; @@ -369,7 +370,7 @@ trait TeamsBaseClient $this->assertIsArray($response['body']); $this->assertNotEmpty($response['body']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, DateTime::isValid($response['body']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['registration'])); $this->assertEquals($response['body']['email'], $email); $this->assertEquals($response['body']['name'], $name); @@ -403,7 +404,7 @@ trait TeamsBaseClient $this->assertIsArray($response['body']); $this->assertNotEmpty($response['body']); $this->assertNotEmpty($response['body']['$id']); - $this->assertEquals(true, DateTime::isValid($response['body']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['registration'])); $this->assertEquals($response['body']['email'], $email); $this->assertEquals($response['body']['name'], $name); diff --git a/tests/e2e/Services/Teams/TeamsBaseServer.php b/tests/e2e/Services/Teams/TeamsBaseServer.php index c4d92ff0d..4c2f1ede6 100644 --- a/tests/e2e/Services/Teams/TeamsBaseServer.php +++ b/tests/e2e/Services/Teams/TeamsBaseServer.php @@ -5,6 +5,7 @@ namespace Tests\E2E\Services\Teams; use Tests\E2E\Client; use Utopia\Database\Database; use Utopia\Database\DateTime; +use Utopia\Database\Validator\DatetimeValidator; trait TeamsBaseServer { @@ -57,7 +58,7 @@ trait TeamsBaseServer $this->assertNotEmpty($response['body']['teamId']); $this->assertNotEmpty($response['body']['teamName']); $this->assertCount(2, $response['body']['roles']); - $this->assertEquals(true, DateTime::isValid($response['body']['joined'])); // is null in DB + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['joined'])); // is null in DB $this->assertEquals(true, $response['body']['confirm']); /** @@ -108,7 +109,7 @@ trait TeamsBaseServer $this->assertEquals($email, $response['body']['userEmail']); $this->assertNotEmpty($response['body']['teamId']); $this->assertCount(2, $response['body']['roles']); - $this->assertEquals(true, DateTime::isValid($response['body']['joined'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['joined'])); $this->assertEquals(true, $response['body']['confirm']); $userUid = $response['body']['userId']; @@ -251,7 +252,7 @@ trait TeamsBaseServer $this->assertEquals('Arsenal', $response['body']['name']); $this->assertEquals(1, $response['body']['total']); $this->assertIsInt($response['body']['total']); - $this->assertEquals(true, DateTime::isValid($response['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['$createdAt'])); /** Delete User */ $user = $this->client->call(Client::METHOD_DELETE, '/users/' . $userUid, array_merge([ @@ -276,6 +277,6 @@ trait TeamsBaseServer $this->assertEquals('Arsenal', $response['body']['name']); $this->assertEquals(0, $response['body']['total']); $this->assertIsInt($response['body']['total']); - $this->assertEquals(true, DateTime::isValid($response['body']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['$createdAt'])); } } diff --git a/tests/e2e/Services/Webhooks/WebhooksBase.php b/tests/e2e/Services/Webhooks/WebhooksBase.php index d3d700a22..f07dd263f 100644 --- a/tests/e2e/Services/Webhooks/WebhooksBase.php +++ b/tests/e2e/Services/Webhooks/WebhooksBase.php @@ -9,6 +9,7 @@ use Utopia\Database\DateTime; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; +use Utopia\Database\Validator\DatetimeValidator; trait WebhooksBase { @@ -529,7 +530,7 @@ trait WebhooksBase $this->assertNotEmpty($webhook['data']['$id']); $this->assertIsArray($webhook['data']['$permissions']); $this->assertEquals($webhook['data']['name'], 'logo.png'); - $this->assertEquals(true, DateTime::isValid($webhook['data']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['$createdAt'])); $this->assertNotEmpty($webhook['data']['signature']); $this->assertEquals($webhook['data']['mimeType'], 'image/png'); $this->assertEquals($webhook['data']['sizeOriginal'], 47218); @@ -587,7 +588,7 @@ trait WebhooksBase $this->assertNotEmpty($webhook['data']['$id']); $this->assertIsArray($webhook['data']['$permissions']); $this->assertEquals($webhook['data']['name'], 'logo.png'); - $this->assertEquals(true, DateTime::isValid($webhook['data']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['$createdAt'])); $this->assertNotEmpty($webhook['data']['signature']); $this->assertEquals($webhook['data']['mimeType'], 'image/png'); $this->assertEquals($webhook['data']['sizeOriginal'], 47218); @@ -637,7 +638,7 @@ trait WebhooksBase $this->assertNotEmpty($webhook['data']['$id']); $this->assertIsArray($webhook['data']['$permissions']); $this->assertEquals($webhook['data']['name'], 'logo.png'); - $this->assertEquals(true, DateTime::isValid($webhook['data']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['$createdAt'])); $this->assertNotEmpty($webhook['data']['signature']); $this->assertEquals($webhook['data']['mimeType'], 'image/png'); $this->assertEquals($webhook['data']['sizeOriginal'], 47218); @@ -719,7 +720,7 @@ trait WebhooksBase $this->assertEquals('Arsenal', $webhook['data']['name']); $this->assertGreaterThan(-1, $webhook['data']['total']); $this->assertIsInt($webhook['data']['total']); - $this->assertEquals(true, DateTime::isValid($webhook['data']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['$createdAt'])); /** * Test for FAILURE @@ -764,7 +765,7 @@ trait WebhooksBase $this->assertEquals('Demo New', $webhook['data']['name']); $this->assertGreaterThan(-1, $webhook['data']['total']); $this->assertIsInt($webhook['data']['total']); - $this->assertEquals(true, DateTime::isValid($webhook['data']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['$createdAt'])); /** * Test for FAILURE @@ -813,7 +814,7 @@ trait WebhooksBase $this->assertEquals('Chelsea', $webhook['data']['name']); $this->assertGreaterThan(-1, $webhook['data']['total']); $this->assertIsInt($webhook['data']['total']); - $this->assertEquals(true, DateTime::isValid($webhook['data']['$createdAt'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['$createdAt'])); /** * Test for FAILURE @@ -874,7 +875,7 @@ trait WebhooksBase $this->assertNotEmpty($webhook['data']['userId']); $this->assertNotEmpty($webhook['data']['teamId']); $this->assertCount(2, $webhook['data']['roles']); - $this->assertEquals(true, DateTime::isValid($webhook['data']['invited'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['invited'])); $this->assertEquals(('server' === $this->getSide()), $webhook['data']['confirm']); /** @@ -946,7 +947,7 @@ trait WebhooksBase $this->assertNotEmpty($webhook['data']['userId']); $this->assertNotEmpty($webhook['data']['teamId']); $this->assertCount(2, $webhook['data']['roles']); - $this->assertEquals(true, DateTime::isValid($webhook['data']['invited'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['invited'])); $this->assertEquals(('server' === $this->getSide()), $webhook['data']['confirm']); } } diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php index 1a49b4b3f..c2fd503c2 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php @@ -9,6 +9,7 @@ use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\SideClient; use Utopia\Database\DateTime; use Utopia\Database\Helpers\ID; +use Utopia\Database\Validator\DatetimeValidator; class WebhooksCustomClientTest extends Scope { @@ -60,7 +61,7 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id']), true); $this->assertNotEmpty($webhook['data']['$id']); $this->assertEquals($webhook['data']['name'], $name); - $this->assertEquals(true, DateTime::isValid($webhook['data']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['registration'])); $this->assertEquals($webhook['data']['status'], true); $this->assertEquals($webhook['data']['email'], $email); $this->assertEquals($webhook['data']['emailVerification'], false); @@ -136,7 +137,7 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide())); $this->assertNotEmpty($webhook['data']['$id']); $this->assertEquals($webhook['data']['name'], $name); - $this->assertEquals(true, DateTime::isValid($webhook['data']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['registration'])); $this->assertEquals($webhook['data']['status'], false); $this->assertEquals($webhook['data']['email'], $email); $this->assertEquals($webhook['data']['emailVerification'], false); @@ -196,7 +197,7 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id']), true); $this->assertNotEmpty($webhook['data']['$id']); $this->assertNotEmpty($webhook['data']['userId']); - $this->assertEquals(true, DateTime::isValid($webhook['data']['expire'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['expire'])); $this->assertEquals($webhook['data']['ip'], '127.0.0.1'); $this->assertNotEmpty($webhook['data']['osCode']); $this->assertIsString($webhook['data']['osCode']); @@ -371,7 +372,7 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide())); $this->assertNotEmpty($webhook['data']['$id']); $this->assertNotEmpty($webhook['data']['userId']); - $this->assertEquals(true, DateTime::isValid($webhook['data']['expire'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['expire'])); $this->assertEquals($webhook['data']['ip'], '127.0.0.1'); $this->assertNotEmpty($webhook['data']['osCode']); $this->assertIsString($webhook['data']['osCode']); @@ -683,7 +684,7 @@ class WebhooksCustomClientTest extends Scope $this->assertNotEmpty($webhook['data']['$id']); $this->assertNotEmpty($webhook['data']['userId']); $this->assertNotEmpty($webhook['data']['secret']); - $this->assertEquals(true, DateTime::isValid($webhook['data']['expire'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['expire'])); $data['secret'] = $webhook['data']['secret']; @@ -743,7 +744,7 @@ class WebhooksCustomClientTest extends Scope $this->assertNotEmpty($webhook['data']['$id']); $this->assertNotEmpty($webhook['data']['userId']); $this->assertNotEmpty($webhook['data']['secret']); - $this->assertEquals(true, DateTime::isValid($webhook['data']['expire'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['expire'])); $data['secret'] = $webhook['data']['secret']; @@ -799,7 +800,7 @@ class WebhooksCustomClientTest extends Scope $this->assertNotEmpty($webhook['data']['$id']); $this->assertNotEmpty($webhook['data']['userId']); $this->assertNotEmpty($webhook['data']['secret']); - $this->assertEquals(true, DateTime::isValid($webhook['data']['expire'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['expire'])); $data['secret'] = $webhook['data']['secret']; @@ -857,7 +858,7 @@ class WebhooksCustomClientTest extends Scope $this->assertNotEmpty($webhook['data']['$id']); $this->assertNotEmpty($webhook['data']['userId']); $this->assertNotEmpty($webhook['data']['secret']); - $this->assertEquals(true, DateTime::isValid($webhook['data']['expire'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['expire'])); $data['secret'] = $webhook['data']['secret']; @@ -920,7 +921,7 @@ class WebhooksCustomClientTest extends Scope $this->assertNotEmpty($webhook['data']['userId']); $this->assertNotEmpty($webhook['data']['teamId']); $this->assertCount(2, $webhook['data']['roles']); - $this->assertEquals(true, DateTime::isValid($webhook['data']['joined'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['joined'])); $this->assertEquals(true, $webhook['data']['confirm']); /** diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index 51f5ef253..c20cb58f4 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -12,6 +12,7 @@ use Utopia\Database\DateTime; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; +use Utopia\Database\Validator\DatetimeValidator; class WebhooksCustomServerTest extends Scope { @@ -245,7 +246,7 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide())); $this->assertNotEmpty($webhook['data']['$id']); $this->assertEquals($webhook['data']['name'], $name); - $this->assertEquals(true, DateTime::isValid($webhook['data']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['registration'])); $this->assertEquals($webhook['data']['status'], true); $this->assertEquals($webhook['data']['email'], $email); $this->assertEquals($webhook['data']['emailVerification'], false); @@ -336,7 +337,7 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide())); $this->assertNotEmpty($webhook['data']['$id']); $this->assertEquals($webhook['data']['name'], $data['name']); - $this->assertEquals(true, DateTime::isValid($webhook['data']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['registration'])); $this->assertEquals($webhook['data']['status'], false); $this->assertEquals($webhook['data']['email'], $data['email']); $this->assertEquals($webhook['data']['emailVerification'], false); @@ -378,7 +379,7 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide())); $this->assertNotEmpty($webhook['data']['$id']); $this->assertEquals($webhook['data']['name'], $data['name']); - $this->assertEquals(true, DateTime::isValid($webhook['data']['registration'])); + $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['registration'])); $this->assertEquals($webhook['data']['status'], false); $this->assertEquals($webhook['data']['email'], $data['email']); $this->assertEquals($webhook['data']['emailVerification'], false); From 0f5b6665fa075286ed6ff757836775836810466e Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 5 Feb 2023 23:06:32 +0200 Subject: [PATCH 75/94] addressing comments --- app/worker.php | 2 +- .../Databases/DatabasesConsoleClientTest.php | 6 +++--- .../Projects/ProjectsConsoleClientTest.php | 14 +++++++------- .../Services/Storage/StorageConsoleClientTest.php | 4 ++-- .../e2e/Services/Users/UsersConsoleClientTest.php | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/worker.php b/app/worker.php index 6be41e448..78671d731 100644 --- a/app/worker.php +++ b/app/worker.php @@ -107,7 +107,7 @@ Server::setResource('pools', function ($register) { $pools = $register->get('pools'); $connection = $pools->get('queue')->pop()->getResource(); $workerNumber = swoole_cpu_num() * intval(App::getEnv('_APP_WORKER_PER_CORE', 6)); -$workerNumber = 1; + if (empty(App::getEnv('QUEUE'))) { throw new Exception('Please configure "QUEUE" environemnt variable.'); } diff --git a/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php b/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php index 0e0ef9fe8..4e2d28bcf 100644 --- a/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php @@ -86,8 +86,8 @@ class DatabasesConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(count($response['body']), 3); $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['documentsCount']); - $this->assertIsArray($response['body']['collectionsCount']); + $this->assertIsArray($response['body']['documentsTotal']); + $this->assertIsArray($response['body']['collectionsTotal']); } @@ -131,7 +131,7 @@ class DatabasesConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(count($response['body']), 2); $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['documentsCount']); + $this->assertIsArray($response['body']['documentsTotal']); } /** diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index 4f8b8bef7..1dfb331ee 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -353,14 +353,14 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(count($response['body']), 9); $this->assertNotEmpty($response['body']); $this->assertEquals('30d', $response['body']['range']); - $this->assertIsArray($response['body']['requests']); + $this->assertIsArray($response['body']['requestsTotal']); $this->assertIsArray($response['body']['network']); - $this->assertIsArray($response['body']['executions']); - $this->assertIsArray($response['body']['documents']); - $this->assertIsArray($response['body']['databases']); - $this->assertIsArray($response['body']['buckets']); - $this->assertIsArray($response['body']['users']); - $this->assertIsArray($response['body']['storage']); + $this->assertIsArray($response['body']['executionsTotal']); + $this->assertIsArray($response['body']['documentsTotal']); + $this->assertIsArray($response['body']['databasesTotal']); + $this->assertIsArray($response['body']['bucketsTotal']); + $this->assertIsArray($response['body']['usersTotal']); + $this->assertIsArray($response['body']['filesStorage']); /** * Test for FAILURE diff --git a/tests/e2e/Services/Storage/StorageConsoleClientTest.php b/tests/e2e/Services/Storage/StorageConsoleClientTest.php index 521f022cb..aff055f18 100644 --- a/tests/e2e/Services/Storage/StorageConsoleClientTest.php +++ b/tests/e2e/Services/Storage/StorageConsoleClientTest.php @@ -41,8 +41,8 @@ class StorageConsoleClientTest extends Scope $this->assertEquals($response['headers']['status-code'], 200); $this->assertEquals(4, count($response['body'])); $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['bucketsCount']); - $this->assertIsArray($response['body']['filesCount']); + $this->assertIsArray($response['body']['bucketsTotal']); + $this->assertIsArray($response['body']['filesTotal']); $this->assertIsArray($response['body']['filesStorage']); } diff --git a/tests/e2e/Services/Users/UsersConsoleClientTest.php b/tests/e2e/Services/Users/UsersConsoleClientTest.php index 616a2ca38..8943bfab6 100644 --- a/tests/e2e/Services/Users/UsersConsoleClientTest.php +++ b/tests/e2e/Services/Users/UsersConsoleClientTest.php @@ -40,7 +40,7 @@ class UsersConsoleClientTest extends Scope $this->assertEquals($response['headers']['status-code'], 200); $this->assertEquals(count($response['body']), 3); $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['usersCount']); - $this->assertIsArray($response['body']['sessionsCount']); + $this->assertIsArray($response['body']['usersTotal']); + $this->assertIsArray($response['body']['sessionsTotal']); } } From ec52cbbb8c46adcf831b080123f547861a0c5668 Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 6 Feb 2023 09:20:03 +0200 Subject: [PATCH 76/94] addressing comments --- tests/e2e/General/UsageTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index f171e1e77..a8598d01c 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -406,7 +406,7 @@ class UsageTest extends Scope $res = $this->client->call( Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes' . '/string', - array_merge($headers, ['content-type' => 'multipart/form-data']), + $headers, [ 'key' => 'name', 'size' => 255, From 84c233a2f1d53c0428ab22150706baa9531cdcc1 Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 6 Feb 2023 10:14:31 +0200 Subject: [PATCH 77/94] addressing comments --- docs/specs/overview.drawio.svg | 884 +-------------------------------- 1 file changed, 4 insertions(+), 880 deletions(-) diff --git a/docs/specs/overview.drawio.svg b/docs/specs/overview.drawio.svg index 2eb08f2b3..d888a2cfc 100644 --- a/docs/specs/overview.drawio.svg +++ b/docs/specs/overview.drawio.svg @@ -1,880 +1,4 @@ - - - - - - - - - -
-
-
- Web -
-
-
-
- - Web - -
-
- - - - - - -
-
-
- Flutter -
-
-
-
- - Flutter - -
-
- - - - - - -
-
-
- iOS -
-
-
-
- - iOS - -
-
- - - - - - -
-
-
- Android -
-
-
-
- - Android - -
-
- - - - - - -
-
-
- Servers -
-
-
-
- - Servers - -
-
- - - - - - -
-
-
- Appwrite -
-
-
-
- - Appwrite - -
-
- - - - - - - - - - - - - - -
-
-
- Loadbalancer -
-
-
-
- - Loadbalancer - -
-
- - - - - - - - - - - - - - - - - - - - - - -
-
-
- REST API -
-
-
-
- - REST API - -
-
- - - - -
-
-
- Queue -
- - (Redis) - -
-
-
-
- - Queue... - -
-
- - - - - - - - -
-
-
- Cache -
- - (Redis) - -
-
-
-
- - Cache... - -
-
- - - - -
-
-
- Database -
-
-
-
- - Database - -
-
- - - - -
-
-
- Users -
-
-
-
- - Users - -
-
- - - - -
-
-
- Account -
-
-
-
- - Account - -
-
- - - - -
-
-
- Teams -
-
-
-
- - Teams - -
-
- - - - -
-
-
- Database -
-
-
-
- - Database - -
-
- - - - -
-
-
- Storage -
-
-
-
- - Storage - -
-
- - - - -
-
-
- Localization -
-
-
-
- - Localization - -
-
- - - - -
-
-
- Avatars -
-
-
-
- - Avatars - -
-
- - - - -
-
-
- Health -
-
-
-
- - Health - -
-
- - - - -
-
-
- SSL Gateway -
-
-
-
- - SSL Gateway - -
-
- - - - - - -
-
-
- Maintenance -
-
-
-
- - Maintenance - -
-
- - - - - - - - - - - - - -
-
-
- Security Layer -
-
-
-
- - Security Layer - -
-
- - - - - - - - - - -
-
-
- Usage -
-
-
-
- - Usage - -
-
- - - - - - - - -
-
-
- Audits -
-
-
-
- - Audits - -
-
- - - - - - - - -
-
-
- Mails -
-
-
-
- - Mails - -
-
- - - - -
-
-
- SMTP -
-
-
-
- - SMTP - -
-
- - - - - - - - -
-
-
- Database -
-
-
-
- - Database - -
-
- - - - - - - - -
-
-
- Webhooks -
-
-
-
- - Webhooks - -
-
- - - - - - - - - - - -
-
-
- Functions -
-
-
-
- - Functions - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- Certs -
-
-
-
- - Certs - -
-
- - - - - - -
-
-
- Deletes -
-
-
-
- - Deletes - -
-
- - - - - - -
-
-
- Letsencrypt -
-
-
-
- - Letsencrypt - -
-
- - - - -
-
-
- 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... - -
-
-
- - - - - Viewer does not support full SVG 1.1 - - - -
\ No newline at end of file + + + +
Web
Web
Flutter
Flutter
iOS
iOS
Android
Android
Servers
Servers
Appwrite
Appwrite
Loadbalancer
Loadbalancer
REST API
REST API
Queue
(Redis)
Queue...
Cache
(Redis)
Cache...
Database
Database
Users
Users
Account
Account
Teams
Teams
Database
Database
Storage
Storage
Localization
Localization
Avatars
Avatars
Health
Health
SSL Gateway
SSL Gateway
Maintenance
Maintenance
Security Layer
Security Layer
Usage
Usage
Audits
Audits
Mails
Mails
SMTP
SMTP
Database
Database
Webhooks
Webhooks
Functions
Functions
Certs
Certs
Deletes
Deletes
Letsencrypt
Letsencrypt
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...
Text is not SVG - cannot display
\ No newline at end of file From 53a32231727f406b66f2e4c8f8cbfbb23f8e752d Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 6 Feb 2023 14:54:37 +0200 Subject: [PATCH 78/94] addressing comments --- app/workers/builds.php | 11 ++++++++--- composer.lock | 8 ++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/app/workers/builds.php b/app/workers/builds.php index 9145808b6..ced0a8411 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -56,6 +56,11 @@ class BuildsV1 extends Worker } } + /** + * @throws \Utopia\Database\Exception\Authorization + * @throws \Utopia\Database\Exception\Structure + * @throws Throwable + */ protected function buildDeployment(Document $project, Document $function, Document $deployment) { global $register; @@ -171,8 +176,8 @@ class BuildsV1 extends Worker try { $response = $this->executor->createRuntime( - projectId: $project->getId(), deploymentId: $deployment->getId(), + projectId: $project->getId(), source: $source, image: $runtime['image'], remove: true, @@ -256,10 +261,10 @@ class BuildsV1 extends Worker ->setProject($project) ->addMetric(METRIC_BUILDS, 1) // per project ->addMetric(METRIC_BUILDS_STORAGE, $build->getAttribute('size', 0)) - ->addMetric(METRIC_BUILDS_COMPUTE, $build->getAttribute('duration', 0)) + ->addMetric(METRIC_BUILDS_COMPUTE, (int)$build->getAttribute('duration', 0) * 1000) ->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS), 1) // per function ->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_STORAGE), $build->getAttribute('size', 0)) - ->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_COMPUTE), $build->getAttribute('duration', 0)) + ->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_COMPUTE), (int)$build->getAttribute('duration', 0) * 1000) ->trigger() ; } diff --git a/composer.lock b/composer.lock index 2e7ffda63..b810568d9 100644 --- a/composer.lock +++ b/composer.lock @@ -1452,12 +1452,12 @@ "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "ba9f0cea086fa7a8b4b613ef4afe41196fd7b4d1" + "reference": "e548c4b5c6f1d7cfc9ba0113fbeb8c4684eddcd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/ba9f0cea086fa7a8b4b613ef4afe41196fd7b4d1", - "reference": "ba9f0cea086fa7a8b4b613ef4afe41196fd7b4d1", + "url": "https://api.github.com/repos/utopia-php/database/zipball/e548c4b5c6f1d7cfc9ba0113fbeb8c4684eddcd2", + "reference": "e548c4b5c6f1d7cfc9ba0113fbeb8c4684eddcd2", "shasum": "" }, "require": { @@ -1499,7 +1499,7 @@ "issues": "https://github.com/utopia-php/database/issues", "source": "https://github.com/utopia-php/database/tree/increment" }, - "time": "2023-02-02T08:34:12+00:00" + "time": "2023-02-05T10:33:42+00:00" }, { "name": "utopia-php/domains", From 794f566fae36b351634f35423f4b98f7aaa14b5e Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 6 Feb 2023 16:03:45 +0200 Subject: [PATCH 79/94] addressing comments --- app/controllers/api/databases.php | 6 ++-- app/controllers/api/storage.php | 4 +-- app/controllers/shared/api.php | 18 +++++----- app/init.php | 10 +++--- app/views/install/compose.phtml | 1 - app/workers/usage.php | 29 ++++++++-------- docs/tutorials/add-route.md | 5 --- tests/resources/docker/docker-compose.yml | 41 ----------------------- 8 files changed, 34 insertions(+), 80 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 3c410c4fd..cf4160b6c 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -2479,8 +2479,8 @@ App::get('/v1/databases/:databaseId/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - str_replace('{databaseId}', $database->getInternalId(), METRIC_DATABASE_ID_COLLECTIONS), - str_replace('{databaseId}', $database->getInternalId(), METRIC_DATABASE_ID_DOCUMENTS), + str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_COLLECTIONS), + str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_DOCUMENTS), ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { @@ -2557,7 +2557,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - str_replace(['{databaseId}', '{collectionId}'], [$database->getInternalId(), $collectionDocument->getInternalId()], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), + str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getInternalId(), $collectionDocument->getInternalId()], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 3098d91b2..7b17dce17 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -1439,8 +1439,8 @@ App::get('/v1/storage/:bucketId/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - str_replace('{bucketId}', $bucket->getInternalId(), METRIC_BUCKET_ID_FILES), - str_replace('{bucketId}', $bucket->getInternalId(), METRIC_BUCKET_ID_FILES_STORAGE), + str_replace('{bucketInternalId}', $bucket->getInternalId(), METRIC_BUCKET_ID_FILES), + str_replace('{bucketInternalId}', $bucket->getInternalId(), METRIC_BUCKET_ID_FILES_STORAGE), ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index fff8c9ade..9eda79766 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -86,10 +86,10 @@ $databaseListener = function (string $event, Document $document, Document $proje break; case str_starts_with($document->getCollection(), 'database_') && !str_contains($document->getCollection(), 'collection'): //collections $parts = explode('_', $document->getCollection()); - $databaseId = $parts[1] ?? 0; + $databaseInternalId = $parts[1] ?? 0; $queueForUsage ->addMetric(METRIC_COLLECTIONS, $value) // per project - ->addMetric(str_replace('{databaseId}', $databaseId, METRIC_DATABASE_ID_COLLECTIONS), $value) // per database + ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, METRIC_DATABASE_ID_COLLECTIONS), $value) // per database ; if ($event === Database::EVENT_DOCUMENT_DELETE) { @@ -99,12 +99,12 @@ $databaseListener = function (string $event, Document $document, Document $proje break; case str_starts_with($document->getCollection(), 'database_') && str_contains($document->getCollection(), '_collection_'): //documents $parts = explode('_', $document->getCollection()); - $databaseId = $parts[1] ?? 0; - $collectionId = $parts[3] ?? 0; + $databaseInternalId = $parts[1] ?? 0; + $collectionInternalId = $parts[3] ?? 0; $queueForUsage ->addMetric(METRIC_DOCUMENTS, $value) // per project - ->addMetric(str_replace('{databaseId}', $databaseId, METRIC_DATABASE_ID_DOCUMENTS), $value) // per database - ->addMetric(str_replace(['{databaseId}', '{collectionId}'], [$databaseId, $collectionId], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), $value); // per collection + ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, METRIC_DATABASE_ID_DOCUMENTS), $value) // per database + ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $collectionInternalId], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), $value); // per collection break; case $document->getCollection() === 'buckets': //buckets $queueForUsage @@ -116,12 +116,12 @@ $databaseListener = function (string $event, Document $document, Document $proje break; case str_starts_with($document->getCollection(), 'bucket_'): // files $parts = explode('_', $document->getCollection()); - $bucketId = $parts[1]; + $bucketInternalId = $parts[1]; $queueForUsage ->addMetric(METRIC_FILES, $value) // per project ->addMetric(METRIC_FILES_STORAGE, $document->getAttribute('sizeOriginal') * $value) // per project - ->addMetric(str_replace('{bucketId}', $bucketId, METRIC_BUCKET_ID_FILES), $value) // per bucket - ->addMetric(str_replace('{bucketId}', $bucketId, METRIC_BUCKET_ID_FILES_STORAGE), $document->getAttribute('sizeOriginal') * $value); // per bucket + ->addMetric(str_replace('{bucketInternalId}', $bucketInternalId, METRIC_BUCKET_ID_FILES), $value) // per bucket + ->addMetric(str_replace('{bucketInternalId}', $bucketInternalId, METRIC_BUCKET_ID_FILES_STORAGE), $document->getAttribute('sizeOriginal') * $value); // per bucket break; case $document->getCollection() === 'functions': $queueForUsage diff --git a/app/init.php b/app/init.php index 1c8e6eb5c..7643638d9 100644 --- a/app/init.php +++ b/app/init.php @@ -180,15 +180,15 @@ const METRIC_USERS = 'users'; const METRIC_SESSIONS = 'sessions'; const METRIC_DATABASES = 'databases'; const METRIC_COLLECTIONS = 'collections'; -const METRIC_DATABASE_ID_COLLECTIONS = '{databaseId}.collections'; +const METRIC_DATABASE_ID_COLLECTIONS = '{databaseInternalId}.collections'; const METRIC_DOCUMENTS = 'documents'; -const METRIC_DATABASE_ID_DOCUMENTS = '{databaseId}.documents'; -const METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS = '{databaseId}.{collectionId}.documents'; +const METRIC_DATABASE_ID_DOCUMENTS = '{databaseInternalId}.documents'; +const METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS = '{databaseInternalId}.{collectionInternalId}.documents'; const METRIC_BUCKETS = 'buckets'; const METRIC_FILES = 'files'; const METRIC_FILES_STORAGE = 'files.storage'; -const METRIC_BUCKET_ID_FILES = '{bucketId}.files'; -const METRIC_BUCKET_ID_FILES_STORAGE = '{bucketId}.files.storage'; +const METRIC_BUCKET_ID_FILES = '{bucketInternalId}.files'; +const METRIC_BUCKET_ID_FILES_STORAGE = '{bucketInternalId}.files.storage'; const METRIC_FUNCTIONS = 'functions'; const METRIC_DEPLOYMENTS = 'deployments'; const METRIC_DEPLOYMENTS_STORAGE = 'deployments.storage'; diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index f38f4c45f..dc058e78d 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -80,7 +80,6 @@ services: - mariadb - redis # - clamav - - influxdb environment: - _APP_ENV - _APP_WORKER_PER_CORE diff --git a/app/workers/usage.php b/app/workers/usage.php index a4d7315ab..c2dea662e 100644 --- a/app/workers/usage.php +++ b/app/workers/usage.php @@ -25,6 +25,7 @@ $periods['1d'] = 'Y-m-d 00:00'; //$periods['1m'] = 'Y-m-1 00:00'; $periods['inf'] = '0000-00-00 00:00'; +const INFINITI_PERIOD = '_inf_'; /** * On Documents that tied by relations like functions>deployments>build || documents>collection>database || buckets>files @@ -54,8 +55,8 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools } break; case $document->getCollection() === 'databases': // databases - $collections = $dbForProject->getDocument('stats', md5("_inf_" . str_replace('{databaseId}', $document->getInternalId(), METRIC_DATABASE_ID_COLLECTIONS))); - $documents = $dbForProject->getDocument('stats', md5("_inf_" . str_replace('{databaseId}', $document->getInternalId(), METRIC_DATABASE_ID_DOCUMENTS))); + $collections = $dbForProject->getDocument('stats', md5(INFINITI_PERIOD . str_replace('{databaseInternalId}', $document->getInternalId(), METRIC_DATABASE_ID_COLLECTIONS))); + $documents = $dbForProject->getDocument('stats', md5(INFINITI_PERIOD . str_replace('{databaseInternalId}', $document->getInternalId(), METRIC_DATABASE_ID_DOCUMENTS))); if (!empty($collections['value'])) { $metrics[] = [ 'key' => METRIC_COLLECTIONS, @@ -72,8 +73,8 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools break; case str_starts_with($document->getCollection(), 'database_') && !str_contains($document->getCollection(), 'collection'): //collections $parts = explode('_', $document->getCollection()); - $databaseId = $parts[1] ?? 0; - $documents = $dbForProject->getDocument('stats', md5("_inf_" . str_replace(['{databaseId}', '{collectionId}'], [$databaseId, $document->getInternalId()], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS))); + $databaseInternalId = $parts[1] ?? 0; + $documents = $dbForProject->getDocument('stats', md5(INFINITI_PERIOD . str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $document->getInternalId()], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS))); if (!empty($documents['value'])) { $metrics[] = [ @@ -81,15 +82,15 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools 'value' => ($documents['value'] * -1), ]; $metrics[] = [ - 'key' => str_replace('{databaseId}', $databaseId, METRIC_DATABASE_ID_DOCUMENTS), + 'key' => str_replace('{databaseInternalId}', $databaseInternalId, METRIC_DATABASE_ID_DOCUMENTS), 'value' => ($documents['value'] * -1), ]; } break; case $document->getCollection() === 'buckets': - $files = $dbForProject->getDocument('stats', md5("_inf_" . str_replace('{bucketId}', $document->getInternalId(), METRIC_BUCKET_ID_FILES))); - $storage = $dbForProject->getDocument('stats', md5("_inf_" . str_replace('{bucketId}', $document->getInternalId(), METRIC_BUCKET_ID_FILES_STORAGE))); + $files = $dbForProject->getDocument('stats', md5(INFINITI_PERIOD . str_replace('{bucketInternalId}', $document->getInternalId(), METRIC_BUCKET_ID_FILES))); + $storage = $dbForProject->getDocument('stats', md5(INFINITI_PERIOD . str_replace('{bucketInternalId}', $document->getInternalId(), METRIC_BUCKET_ID_FILES_STORAGE))); if (!empty($files['value'])) { $metrics[] = [ @@ -107,13 +108,13 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools break; case $document->getCollection() === 'functions': - $deployments = $dbForProject->getDocument('stats', md5("_inf_" . str_replace(['{resourceType}', '{resourceInternalId}'], ['function', $document->getInternalId()], METRIC_FUNCTION_ID_DEPLOYMENTS))); - $deploymentsStorage = $dbForProject->getDocument('stats', md5("_inf_" . str_replace(['{resourceType}', '{resourceInternalId}'], ['function', $document->getInternalId()], METRIC_FUNCTION_ID_DEPLOYMENTS_STORAGE))); - $builds = $dbForProject->getDocument('stats', md5("_inf_" . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_BUILDS))); - $buildsStorage = $dbForProject->getDocument('stats', md5("_inf_" . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_BUILDS_STORAGE))); - $buildsCompute = $dbForProject->getDocument('stats', md5("_inf_" . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_BUILDS_COMPUTE))); - $executions = $dbForProject->getDocument('stats', md5("_inf_" . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS))); - $executionsCompute = $dbForProject->getDocument('stats', md5("_inf_" . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE))); + $deployments = $dbForProject->getDocument('stats', md5(INFINITI_PERIOD . str_replace(['{resourceType}', '{resourceInternalId}'], ['function', $document->getInternalId()], METRIC_FUNCTION_ID_DEPLOYMENTS))); + $deploymentsStorage = $dbForProject->getDocument('stats', md5(INFINITI_PERIOD . str_replace(['{resourceType}', '{resourceInternalId}'], ['function', $document->getInternalId()], METRIC_FUNCTION_ID_DEPLOYMENTS_STORAGE))); + $builds = $dbForProject->getDocument('stats', md5(INFINITI_PERIOD . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_BUILDS))); + $buildsStorage = $dbForProject->getDocument('stats', md5(INFINITI_PERIOD . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_BUILDS_STORAGE))); + $buildsCompute = $dbForProject->getDocument('stats', md5(INFINITI_PERIOD . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_BUILDS_COMPUTE))); + $executions = $dbForProject->getDocument('stats', md5(INFINITI_PERIOD . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS))); + $executionsCompute = $dbForProject->getDocument('stats', md5(INFINITI_PERIOD . str_replace('{functionInternalId}', $document->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE))); if (!empty($deployments['value'])) { $metrics[] = [ diff --git a/docs/tutorials/add-route.md b/docs/tutorials/add-route.md index f66276e97..52f0cb4c0 100644 --- a/docs/tutorials/add-route.md +++ b/docs/tutorials/add-route.md @@ -127,11 +127,6 @@ App::post('/v1/storage/buckets/:bucketId/files') ->label('event', 'buckets.[bucketId].files.[fileId].create') ``` -#### Usage - -- usage.metric - The metric the route generates. -- usage.params - Additional parameters the metrics can have. - ```php App::post('/v1/storage/buckets/:bucketId/files') ->label('usage.metric', 'files.{scope}.requests.create') diff --git a/tests/resources/docker/docker-compose.yml b/tests/resources/docker/docker-compose.yml index 36bc43456..6b0644c01 100644 --- a/tests/resources/docker/docker-compose.yml +++ b/tests/resources/docker/docker-compose.yml @@ -63,7 +63,6 @@ services: - mariadb - redis # - clamav - - influxdb environment: - _APP_ENV - _APP_OPTIONS_ABUSE @@ -79,8 +78,6 @@ services: - _APP_DB_USER - _APP_DB_PASS - _APP_USAGE_STATS - - _APP_INFLUXDB_HOST - - _APP_INFLUXDB_PORT - _APP_STORAGE_ANTIVIRUS=disabled - _APP_STORAGE_LIMIT - _APP_FUNCTIONS_TIMEOUT @@ -100,13 +97,10 @@ services: - appwrite depends_on: - redis - - telegraf environment: - _APP_ENV - _APP_REDIS_HOST - _APP_REDIS_PORT - - _APP_STATSD_HOST - - _APP_STATSD_PORT appwrite-worker-audits: entrypoint: worker-audits @@ -368,21 +362,6 @@ services: # volumes: # - appwrite-uploads:/storage/uploads - influxdb: - image: influxdb:1.6 - container_name: appwrite-influxdb - restart: unless-stopped - networks: - - appwrite - volumes: - - appwrite-influxdb:/var/lib/influxdb:rw - - telegraf: - image: appwrite/telegraf:1.1.0 - container_name: appwrite-telegraf - restart: unless-stopped - networks: - - appwrite # redis-commander: # image: rediscommander/redis-commander:latest @@ -407,24 +386,6 @@ services: # - RESQUE_WEB_HTTP_BASIC_AUTH_USER=user # - RESQUE_WEB_HTTP_BASIC_AUTH_PASSWORD=password - # chronograf: - # image: chronograf:1.5 - # container_name: appwrite-chronograf - # restart: unless-stopped - # networks: - # - appwrite - # volumes: - # - appwrite-chronograf:/var/lib/chronograf - # ports: - # - "8888:8888" - # environment: - # - INFLUXDB_URL=http://influxdb:8086 - # - KAPACITOR_URL=http://kapacitor:9092 - # - AUTH_DURATION=48h - # - TOKEN_SECRET=duperduper5674829!jwt - # - GH_CLIENT_ID=d86f7145a41eacfc52cc - # - GH_CLIENT_SECRET=9e0081062367a2134e7f2ea95ba1a32d08b6c8ab - # - GH_ORGS=appwrite # webgrind: # image: 'jokkedk/webgrind:latest' @@ -444,6 +405,4 @@ volumes: appwrite-uploads: appwrite-certificates: appwrite-functions: - appwrite-influxdb: - appwrite-chronograf: appwrite-config: \ No newline at end of file From f20144dbcdff0dc50f68896b0de520097a8e774c Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 6 Feb 2023 16:40:22 +0200 Subject: [PATCH 80/94] addressing comments --- tests/unit/Docker/ComposeTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/Docker/ComposeTest.php b/tests/unit/Docker/ComposeTest.php index e1677d570..56448ffd0 100644 --- a/tests/unit/Docker/ComposeTest.php +++ b/tests/unit/Docker/ComposeTest.php @@ -28,7 +28,7 @@ class ComposeTest extends TestCase public function testServices(): void { - $this->assertCount(17, $this->object->getServices()); + $this->assertCount(15, $this->object->getServices()); $this->assertEquals('appwrite', $this->object->getService('appwrite')->getContainerName()); $this->assertEquals('', $this->object->getService('appwrite')->getImageVersion()); $this->assertEquals('2.2', $this->object->getService('traefik')->getImageVersion()); @@ -42,7 +42,7 @@ class ComposeTest extends TestCase public function testVolumes(): void { - $this->assertCount(9, $this->object->getVolumes()); + $this->assertCount(7, $this->object->getVolumes()); $this->assertEquals('appwrite-mariadb', $this->object->getVolumes()[0]); $this->assertEquals('appwrite-redis', $this->object->getVolumes()[1]); $this->assertEquals('appwrite-cache', $this->object->getVolumes()[2]); From 69bdb105be55dcf9854a774b65bdf10107d27e2a Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 6 Feb 2023 17:20:14 +0200 Subject: [PATCH 81/94] addressing comments --- tests/e2e/Services/Account/AccountCustomClientTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/Account/AccountCustomClientTest.php b/tests/e2e/Services/Account/AccountCustomClientTest.php index 3cbb9a4d2..9018ed067 100644 --- a/tests/e2e/Services/Account/AccountCustomClientTest.php +++ b/tests/e2e/Services/Account/AccountCustomClientTest.php @@ -10,8 +10,8 @@ use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\SideClient; use Utopia\Database\DateTime; use Utopia\Database\Helpers\ID; - use Utopia\Database\Validator\DatetimeValidator; + use function sleep; class AccountCustomClientTest extends Scope From 1c910bababcbe3a9144bcfc909c6e380ea5e6c73 Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 7 Feb 2023 20:14:37 +0200 Subject: [PATCH 82/94] addressing comments --- CHANGES.md | 33 +++++++++++++++++++ .../Utopia/Response/Model/UsageStorage.php | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 6a51a738e..46ca93eb1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,39 @@ - Get default region from environment on project create [#4780](https://github.com/appwrite/appwrite/pull/4780) - Store build output file size [#4844](https://github.com/appwrite/appwrite/pull/4844) - Fix max mimetype size [#4814](https://github.com/appwrite/appwrite/pull/4814) +- New usage metrics collection flow (https://github.com/appwrite/appwrite/pull/4770) + - Deprecated influxdb, statsd, telegraf containers and removed all of their occurrences from the code. + - Removed _APP_INFLUXDB_HOST, _APP_INFLUXDB_PORT, _APP_STATSD_HOST, _APP_STATSD_PORT env variables. + - Removed usage labels dependency. + - Usage metrics are processed via new usage worker. + - Metrics changes: + - Storage + - deprecated + - filesCreate, filesRead, filesUpdate, filesDelete, bucketsCreate, bucketsRead, bucketsUpdate, bucketsDelete. + - renamed + - filesCount to filesTotal, storage to filesStorage, bucketsCount to bucketsTotal. + - Auth + - deprecated + - usersCreate, usersRead, usersUpdate, usersDelete, sessionsCreate sessionsProviderCreate, sessionsDelete. + - renamed + - usersCount to usersTotal. + - added + - sessionsTotal. + - Databases + - deprecated + - databasesCreate, databasesRead, databasesDelete, documentsCreate, documentsRead, documentsUpdate, documentsDelete, collectionsCreate, collectionsRead, collectionsUpdate, collectionsDelete. + - renamed + - databasesCount to databasesTotal, collectionsCount to collectionsTotal, documentsCount to documentsTotal. + - Functions + - deprecated + - executionsFailure, executionsSuccess, buildsFailure, buildsSuccess, executionsFailure, executionsSuccess + - renamed + - executionsTime to executionsCompute, buildsTime to buildsCompute, documentsCount to documentsTotal. + - added + - functionsTotal, buildsStorage, deploymentsTotal, deploymentsStorage. + - Project + - renamed + - executions to executionsTotal, builds to buildsTotal, requests to requestsTotal, storage to filesStorage, buckets to bucketsTotal, users to usersTotal, documents to documentsTotal, collections to collectionsTotal, databases to databasesTotal. # Version 1.1.2 ## Changes diff --git a/src/Appwrite/Utopia/Response/Model/UsageStorage.php b/src/Appwrite/Utopia/Response/Model/UsageStorage.php index 88d0beca0..30e181e7c 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageStorage.php +++ b/src/Appwrite/Utopia/Response/Model/UsageStorage.php @@ -30,7 +30,7 @@ class UsageStorage extends Model 'example' => [], 'array' => true ]) - ->addRule('filesStorage', [ + ->addRule('storage', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for the occupied storage size (in bytes).', 'default' => [], From ab0d5b509b1fbb417a7763526fe1b67daee6ac9a Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 8 Feb 2023 09:46:30 +0200 Subject: [PATCH 83/94] addressing comments --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 46ca93eb1..b1f8b9560 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,7 +6,7 @@ - Get default region from environment on project create [#4780](https://github.com/appwrite/appwrite/pull/4780) - Store build output file size [#4844](https://github.com/appwrite/appwrite/pull/4844) - Fix max mimetype size [#4814](https://github.com/appwrite/appwrite/pull/4814) -- New usage metrics collection flow (https://github.com/appwrite/appwrite/pull/4770) +- New usage metrics collection flow [#4770](https://github.com/appwrite/appwrite/pull/4770) - Deprecated influxdb, statsd, telegraf containers and removed all of their occurrences from the code. - Removed _APP_INFLUXDB_HOST, _APP_INFLUXDB_PORT, _APP_STATSD_HOST, _APP_STATSD_PORT env variables. - Removed usage labels dependency. From f00cc06daf5cbe2fa47838eea86efe715594209b Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 8 Feb 2023 18:34:22 +0200 Subject: [PATCH 84/94] addressing comments --- app/config/specs/open-api3-latest-client.json | 2 +- app/config/specs/open-api3-latest-console.json | 2 +- app/config/specs/open-api3-latest-server.json | 2 +- app/config/specs/swagger2-latest-client.json | 2 +- app/config/specs/swagger2-latest-console.json | 2 +- app/config/specs/swagger2-latest-server.json | 2 +- src/Appwrite/Platform/Tasks/SDKs.php | 16 ++++++++-------- src/Appwrite/Platform/Tasks/Specs.php | 6 +++--- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index a257eddb1..0ad389586 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":"1.1.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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"get","weight":18,"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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"create","weight":6,"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 `ID.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"]}}}}}},"\/account\/email":{"patch":{"summary":"Update 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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateEmail","weight":25,"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 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":17,"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":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","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":"listLogs","weight":21,"cookies":false,"type":"","demo":"account\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateName","weight":23,"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 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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePassword","weight":24,"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\/phone":{"patch":{"summary":"Update Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePhone","weight":26,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.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":{"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["phone","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":19,"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 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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePrefs","weight":27,"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":32,"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":33,"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":"List Sessions","operationId":"accountListSessions","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":"listSessions","weight":20,"cookies":false,"type":"","demo":"account\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":[]}]},"delete":{"summary":"Delete 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":31,"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":16,"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\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","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":"createEmailSession","weight":7,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.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"]}}}}}},"\/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. If the provided user ID has not be registered, a new user will be created. 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":12,"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 `ID.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":13,"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 OAuth2 Session","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":8,"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, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","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. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","tags":["account"],"description":"Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":14,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-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 `ID.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]"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"}},"required":["userId","phone"]}}}}},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-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\/{sessionId}":{"get":{"summary":"Get Session","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":22,"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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":30,"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 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":29,"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\/status":{"patch":{"summary":"Update Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateStatus","weight":28,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.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\/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#accountUpdateEmailVerification). 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":34,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-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":35,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-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"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":36,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number 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":"updatePhoneVerification","weight":37,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":39,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":38,"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":42,"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. Country codes follow the [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":40,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":41,"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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":44,"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":"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.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":43,"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 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","tags":["databases"],"description":"Get a list of all the user's documents in a given collection. You can use the query params to filter your results.","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":74,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","tags":["databases"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":73,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 `ID.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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","tags":["databases"],"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":75,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesUpdateDocument","tags":["databases"],"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":77,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","tags":["databases"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":78,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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}\/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.","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":202,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, statusCode, duration","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":201,"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":"ip:{ip},userId:{userId}","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 in the background. Default value is false.","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":203,"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":82,"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":"localeListContinents","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":"listContinents","weight":86,"cookies":false,"type":"","demo":"locale\/list-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountries","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":"listCountries","weight":83,"cookies":false,"type":"","demo":"locale\/list-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesEU","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":"listCountriesEU","weight":84,"cookies":false,"type":"","demo":"locale\/list-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesPhones","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":"listCountriesPhones","weight":85,"cookies":false,"type":"","demo":"locale\/list-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCurrencies","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":"listCurrencies","weight":87,"cookies":false,"type":"","demo":"locale\/list-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListLanguages","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":"listLanguages","weight":88,"cookies":false,"type":"","demo":"locale\/list-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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.","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":139,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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\/storage#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":138,"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":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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 `ID.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},"permissions":{"type":"array","description":"An array of permission strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","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":140,"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":144,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":{"permissions":{"type":"array","description":"An array of permission string. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","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":145,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":142,"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":141,"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":143,"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.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":149,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":148,"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 `ID.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). Maximum of 100 roles are allowed, each 32 characters long.","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":150,"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":151,"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":152,"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":"List Team Memberships","operationId":"teamsListMemberships","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":"listMemberships","weight":154,"cookies":false,"type":"","demo":"teams\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":153,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","weight":155,"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":156,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":158,"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":157,"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.","x-globalAttributes":[]},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.","x-globalAttributes":[]},{"name":"databases","description":"The Databases service allows you to create structured collections of documents, query and filter lists of documents","x-globalAttributes":["databaseId"]},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location.","x-globalAttributes":[]},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health.","x-globalAttributes":[]},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"storage","description":"The Storage service allows you to manage your project files.","x-globalAttributes":[]},{"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","x-globalAttributes":[]},{"name":"users","description":"The Users service allows you to manage your project users.","x-globalAttributes":[]},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions.","x-globalAttributes":[]}],"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"},"$collectionId":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"string","description":"Document creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Document update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Document permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]}},"additionalProperties":true,"required":["$id","$collectionId","$databaseId","$createdAt","$updatedAt","$permissions"]},"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":"string","description":"Log creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"]},"account":{"description":"Account","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Session creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"string","description":"Session expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"The date of when the access token expires in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","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"},"$createdAt":{"type":"string","description":"Token creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"Token expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","$createdAt","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"},"$createdAt":{"type":"string","description":"File creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"File update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"File permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"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","$createdAt","$updatedAt","$permissions","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Team creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Team update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Membership creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Membership update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"string","description":"Date, the user has been invited to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"joined":{"type":"string","description":"Date, the user has accepted the invitation to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Execution creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Execution upate date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Execution roles.","items":{"type":"string"},"x-example":["any"]},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"duration":{"type":"number","description":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"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"}} +{"openapi":"3.0.0","info":{"version":"1.1.2","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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"get","weight":19,"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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"create","weight":7,"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 `ID.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"]}}}}}},"\/account\/email":{"patch":{"summary":"Update 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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateEmail","weight":26,"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 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":18,"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":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","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":"listLogs","weight":22,"cookies":false,"type":"","demo":"account\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateName","weight":24,"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 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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePassword","weight":25,"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\/phone":{"patch":{"summary":"Update Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.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":{"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["phone","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":20,"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 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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePrefs","weight":28,"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":33,"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":34,"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":"List Sessions","operationId":"accountListSessions","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":"listSessions","weight":21,"cookies":false,"type":"","demo":"account\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":[]}]},"delete":{"summary":"Delete 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":32,"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":17,"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\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","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":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.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"]}}}}}},"\/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. If the provided user ID has not be registered, a new user will be created. 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":13,"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 `ID.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":14,"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 OAuth2 Session","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":9,"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, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","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. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","tags":["account"],"description":"Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-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 `ID.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]"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"}},"required":["userId","phone"]}}}}},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":16,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-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\/{sessionId}":{"get":{"summary":"Get Session","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":23,"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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":31,"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 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":30,"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\/status":{"patch":{"summary":"Update Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateStatus","weight":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.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\/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#accountUpdateEmailVerification). 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":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-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":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-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"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number 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":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":40,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":39,"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":43,"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. Country codes follow the [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":41,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":42,"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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":45,"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":"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.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":44,"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 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","tags":["databases"],"description":"Get a list of all the user's documents in a given collection. You can use the query params to filter your results.","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":75,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","tags":["databases"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":74,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 `ID.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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","tags":["databases"],"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":76,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesUpdateDocument","tags":["databases"],"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":78,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","tags":["databases"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":79,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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}\/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.","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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, statusCode, duration","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":"ip:{ip},userId:{userId}","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 in the background. Default value is false.","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":83,"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":"localeListContinents","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":"listContinents","weight":87,"cookies":false,"type":"","demo":"locale\/list-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountries","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":"listCountries","weight":84,"cookies":false,"type":"","demo":"locale\/list-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesEU","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":"listCountriesEU","weight":85,"cookies":false,"type":"","demo":"locale\/list-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesPhones","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":"listCountriesPhones","weight":86,"cookies":false,"type":"","demo":"locale\/list-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCurrencies","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":"listCurrencies","weight":88,"cookies":false,"type":"","demo":"locale\/list-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListLanguages","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":"listLanguages","weight":89,"cookies":false,"type":"","demo":"locale\/list-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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.","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":142,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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\/storage#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":141,"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":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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 `ID.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},"permissions":{"type":"array","description":"An array of permission strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","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":143,"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":147,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":{"permissions":{"type":"array","description":"An array of permission string. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","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":148,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":145,"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":144,"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":146,"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.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":152,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":151,"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 `ID.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). Maximum of 100 roles are allowed, each 32 characters long.","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":153,"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":154,"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":155,"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":"List Team Memberships","operationId":"teamsListMemberships","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":"listMemberships","weight":157,"cookies":false,"type":"","demo":"teams\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":156,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","weight":158,"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":159,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":161,"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":160,"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.","x-globalAttributes":[]},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.","x-globalAttributes":[]},{"name":"databases","description":"The Databases service allows you to create structured collections of documents, query and filter lists of documents","x-globalAttributes":["databaseId"]},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location.","x-globalAttributes":[]},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health.","x-globalAttributes":[]},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"project","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"storage","description":"The Storage service allows you to manage your project files.","x-globalAttributes":[]},{"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","x-globalAttributes":[]},{"name":"users","description":"The Users service allows you to manage your project users.","x-globalAttributes":[]},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions.","x-globalAttributes":[]}],"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"},"$collectionId":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"string","description":"Document creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Document update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Document permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]}},"additionalProperties":true,"required":["$id","$collectionId","$databaseId","$createdAt","$updatedAt","$permissions"]},"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":"string","description":"Log creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"]},"account":{"description":"Account","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Session creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"string","description":"Session expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"The date of when the access token expires in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","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"},"$createdAt":{"type":"string","description":"Token creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"Token expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","$createdAt","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"},"$createdAt":{"type":"string","description":"File creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"File update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"File permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"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","$createdAt","$updatedAt","$permissions","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Team creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Team update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Membership creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Membership update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"string","description":"Date, the user has been invited to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"joined":{"type":"string","description":"Date, the user has accepted the invitation to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Execution creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Execution upate date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Execution roles.","items":{"type":"string"},"x-example":["any"]},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"duration":{"type":"number","description":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"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 1cd93e8bb..ddd8575cc 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":"1.1.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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"get","weight":18,"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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"create","weight":6,"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 `ID.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"]}}}}}},"\/account\/email":{"patch":{"summary":"Update 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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateEmail","weight":25,"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 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":17,"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":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","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":"listLogs","weight":21,"cookies":false,"type":"","demo":"account\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateName","weight":23,"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 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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePassword","weight":24,"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\/phone":{"patch":{"summary":"Update Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePhone","weight":26,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.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":{"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["phone","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":19,"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 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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePrefs","weight":27,"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":32,"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":33,"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":"List Sessions","operationId":"accountListSessions","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":"listSessions","weight":20,"cookies":false,"type":"","demo":"account\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":[]}]},"delete":{"summary":"Delete 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":31,"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":16,"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\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","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":"createEmailSession","weight":7,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.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"]}}}}}},"\/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. If the provided user ID has not be registered, a new user will be created. 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":12,"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 `ID.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":13,"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 OAuth2 Session","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":8,"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, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","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. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","tags":["account"],"description":"Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":14,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-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 `ID.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]"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"}},"required":["userId","phone"]}}}}},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-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\/{sessionId}":{"get":{"summary":"Get Session","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":22,"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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":30,"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 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":29,"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\/status":{"patch":{"summary":"Update Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateStatus","weight":28,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.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\/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#accountUpdateEmailVerification). 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":34,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-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":35,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-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"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":36,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number 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":"updatePhoneVerification","weight":37,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":39,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":38,"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":42,"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. Country codes follow the [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":40,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":41,"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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":44,"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":"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.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":43,"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 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","tags":["databases"],"description":"Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.","responses":{"200":{"description":"Databases List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/databaseList"}}}}},"x-appwrite":{"method":"list","weight":46,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","tags":["databases"],"description":"Create a new Database.\n","responses":{"201":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"create","weight":45,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"databaseId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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":"[DATABASE_ID]","x-global":true},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["databaseId","name"]}}}}}},"\/databases\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabases"}}}}},"x-appwrite":{"method":"getUsage","weight":79,"cookies":false,"type":"","demo":"databases\/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"}]}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","tags":["databases"],"description":"Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.","responses":{"200":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"get","weight":47,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","tags":["databases"],"description":"Update a database by its unique ID.","responses":{"200":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"update","weight":49,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Database","operationId":"databasesDelete","tags":["databases"],"description":"Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":50,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","tags":["databases"],"description":"Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"listCollections","weight":52,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","tags":["databases"],"description":"Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"createCollection","weight":51,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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]"},"permissions":{"type":"array","description":"An array of permissions strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","x-example":false}},"required":["collectionId","name"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","tags":["databases"],"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":53,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","tags":["databases"],"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":55,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permission are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","x-example":false}},"required":["name"]}}}}},"delete":{"summary":"Delete Collection","operationId":"databasesDeleteCollection","tags":["databases"],"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":56,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":66,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","tags":["databases"],"description":"Create a boolean attribute.\n","responses":{"202":{"description":"AttributeBoolean","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"createBooleanAttribute","weight":64,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":65,"cookies":false,"type":"","demo":"databases\/create-datetime-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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 the attribute in ISO 8601 format. Cannot be set when attribute is required.","x-example":"2020-10-15T06:38:00.000+00:00"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","tags":["databases"],"description":"Create an email attribute.\n","responses":{"202":{"description":"AttributeEmail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"createEmailAttribute","weight":58,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":59,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 elements are allowed, each 4096 characters long.","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","tags":["databases"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeFloat","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"createFloatAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","tags":["databases"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeInteger","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"createIntegerAttribute","weight":62,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","tags":["databases"],"description":"Create IP address attribute.\n","responses":{"202":{"description":"AttributeIP","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"createIpAttribute","weight":60,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","tags":["databases"],"description":"Create a string attribute.\n","responses":{"202":{"description":"AttributeString","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"createStringAttribute","weight":57,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","tags":["databases"],"description":"Create a URL attribute.\n","responses":{"202":{"description":"AttributeURL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"createUrlAttribute","weight":61,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime, or AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeString","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/attributeDatetime"},{"$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\/attributeDatetime"},{"$ref":"#\/components\/schemas\/attributeString"}]}}}}},"x-appwrite":{"method":"getAttribute","weight":67,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteAttribute","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":68,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","tags":["databases"],"description":"Get a list of all the user's documents in a given collection. You can use the query params to filter your results.","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":74,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","tags":["databases"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":73,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 `ID.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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","tags":["databases"],"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":75,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesUpdateDocument","tags":["databases"],"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":77,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","tags":["databases"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":78,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databasesListDocumentLogs","tags":["databases"],"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":76,"cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":70,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","tags":["databases"],"description":"","responses":{"202":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":69,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 attributes are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","tags":["databases"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":71,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteIndex","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":72,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListCollectionLogs","tags":["databases"],"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":54,"cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageCollection"}}}}},"x-appwrite":{"method":"getCollectionUsage","weight":81,"cookies":false,"type":"","demo":"databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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"}]}},"\/databases\/{databaseId}\/logs":{"get":{"summary":"List Database Logs","operationId":"databasesListLogs","tags":["databases"],"description":"Get the database activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":48,"cookies":false,"type":"","demo":"databases\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabase"}}}}},"x-appwrite":{"method":"getDatabaseUsage","weight":80,"cookies":false,"type":"","demo":"databases\/get-database-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"range","description":"`Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/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":188,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":187,"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 `ID.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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","x-example":false}},"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":189,"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\/usage":{"get":{"summary":"Get Functions Usage","operationId":"functionsGetUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getUsage","weight":192,"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":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/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":190,"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":193,"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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","x-example":"[\"any\"]","items":{"type":"string"}},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","x-example":false}},"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":195,"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":197,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: entrypoint, size, buildId, activate","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":{"202":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":196,"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":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"getDeployment","weight":198,"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":194,"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":199,"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":"Create Build","operationId":"functionsCreateBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":200,"cookies":false,"type":"","demo":"functions\/create-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.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"},{"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.","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":202,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, statusCode, duration","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":201,"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":"ip:{ip},userId:{userId}","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 in the background. Default value is false.","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":203,"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":"functionsGetFunctionUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getFunctionUsage","weight":191,"cookies":false,"type":"","demo":"functions\/get-function-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"}]}},"\/functions\/{functionId}\/variables":{"get":{"summary":"List Variables","operationId":"functionsListVariables","tags":["functions"],"description":"Get a list of all variables of a specific function.","responses":{"200":{"description":"Variables List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variableList"}}}}},"x-appwrite":{"method":"listVariables","weight":205,"cookies":false,"type":"","demo":"functions\/list-variables.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-variables.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"post":{"summary":"Create Variable","operationId":"functionsCreateVariable","tags":["functions"],"description":"Create a new function variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"createVariable","weight":204,"cookies":false,"type":"","demo":"functions\/create-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","x-example":"[VALUE]"}},"required":["key","value"]}}}}}},"\/functions\/{functionId}\/variables\/{variableId}":{"get":{"summary":"Get Variable","operationId":"functionsGetVariable","tags":["functions"],"description":"Get a variable by its unique ID.","responses":{"200":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"getVariable","weight":206,"cookies":false,"type":"","demo":"functions\/get-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_ID]"},"in":"path"}]},"put":{"summary":"Update Variable","operationId":"functionsUpdateVariable","tags":["functions"],"description":"Update variable by its unique ID.","responses":{"200":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"updateVariable","weight":207,"cookies":false,"type":"","demo":"functions\/update-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","x-example":"[VALUE]"}},"required":["key"]}}}}},"delete":{"summary":"Delete Variable","operationId":"functionsDeleteVariable","tags":["functions"],"description":"Delete a variable by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteVariable","weight":208,"cookies":false,"type":"","demo":"functions\/delete-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_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":89,"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":99,"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":92,"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":91,"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":96,"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":97,"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":95,"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\/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":94,"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":98,"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":93,"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":82,"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":"localeListContinents","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":"listContinents","weight":86,"cookies":false,"type":"","demo":"locale\/list-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountries","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":"listCountries","weight":83,"cookies":false,"type":"","demo":"locale\/list-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesEU","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":"listCountriesEU","weight":84,"cookies":false,"type":"","demo":"locale\/list-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesPhones","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":"listCountriesPhones","weight":85,"cookies":false,"type":"","demo":"locale\/list-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCurrencies","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":"listCurrencies","weight":87,"cookies":false,"type":"","demo":"locale\/list-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListLanguages","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":"listLanguages","weight":88,"cookies":false,"type":"","demo":"locale\/list-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":102,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":101,"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 `ID.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]"},"region":{"type":"string","description":"Project Region.","x-example":"default"},"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","region"]}}}}}},"\/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":103,"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":105,"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":111,"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\/duration":{"patch":{"summary":"Update Project Authentication Duration","operationId":"projectsUpdateAuthDuration","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthDuration","weight":109,"cookies":false,"type":"","demo":"projects\/update-auth-duration.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":{"duration":{"type":"integer","description":"Project session length in seconds. Max length: 31536000 seconds.","x-example":0}},"required":["duration"]}}}}}},"\/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":108,"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":110,"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":129,"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":128,"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":130,"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":132,"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":131,"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":119,"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":118,"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. Maximum of 100 scopes are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","x-example":"2020-10-15T06:38:00.000+00:00"}},"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":120,"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":121,"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. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["name","scopes"]}}}}},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":122,"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":107,"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]"},"enabled":{"type":"boolean","description":"Provider status. Set to 'false' to disable new session creation.","x-example":false}},"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":124,"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":123,"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":null}},"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":125,"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":126,"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":null}},"required":["name"]}}}}},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":127,"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":106,"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":104,"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":113,"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":112,"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. Maximum of 100 events are allowed.","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":114,"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":115,"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. Maximum of 100 events are allowed.","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":117,"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"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhookSignature","weight":116,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.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":134,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":133,"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 `ID.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]"},"permissions":{"type":"array","description":"An array of permission strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","x-example":"none"},"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"]}}}}}},"\/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":135,"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":136,"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","x-example":"none"},"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"]}}}}},"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":137,"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.","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":139,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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\/storage#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":138,"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":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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 `ID.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},"permissions":{"type":"array","description":"An array of permission strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","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":140,"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":144,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":{"permissions":{"type":"array","description":"An array of permission string. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","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":145,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":142,"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":141,"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":143,"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":146,"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":147,"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.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":149,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":148,"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 `ID.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). Maximum of 100 roles are allowed, each 32 characters long.","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":150,"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":151,"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":152,"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}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":159,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"List Team Memberships","operationId":"teamsListMemberships","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":"listMemberships","weight":154,"cookies":false,"type":"","demo":"teams\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":153,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","weight":155,"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":156,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":158,"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":157,"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":168,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":160,"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 `ID.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"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"},"password":{"type":"string","description":"Plain text 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"]}}}}}},"\/users\/argon2":{"post":{"summary":"Create User with Argon2 Password","operationId":"usersCreateArgon2User","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createArgon2User","weight":163,"cookies":false,"type":"","demo":"users\/create-argon2user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-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 `ID.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 hashed using Argon2.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/bcrypt":{"post":{"summary":"Create User with Bcrypt Password","operationId":"usersCreateBcryptUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createBcryptUser","weight":161,"cookies":false,"type":"","demo":"users\/create-bcrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-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 `ID.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 hashed using Bcrypt.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/md5":{"post":{"summary":"Create User with MD5 Password","operationId":"usersCreateMD5User","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createMD5User","weight":162,"cookies":false,"type":"","demo":"users\/create-m-d5user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-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 `ID.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 hashed using MD5.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/phpass":{"post":{"summary":"Create User with PHPass Password","operationId":"usersCreatePHPassUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createPHPassUser","weight":165,"cookies":false,"type":"","demo":"users\/create-p-h-pass-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-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 `ID.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 hashed using PHPass.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/scrypt":{"post":{"summary":"Create User with Scrypt Password","operationId":"usersCreateScryptUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createScryptUser","weight":166,"cookies":false,"type":"","demo":"users\/create-scrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-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 `ID.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 hashed using Scrypt.","x-example":"password"},"passwordSalt":{"type":"string","description":"Optional salt used to hash password.","x-example":"[PASSWORD_SALT]"},"passwordCpu":{"type":"integer","description":"Optional CPU cost used to hash password.","x-example":null},"passwordMemory":{"type":"integer","description":"Optional memory cost used to hash password.","x-example":null},"passwordParallel":{"type":"integer","description":"Optional parallelization cost used to hash password.","x-example":null},"passwordLength":{"type":"integer","description":"Optional hash length used to hash password.","x-example":null},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordCpu","passwordMemory","passwordParallel","passwordLength"]}}}}}},"\/users\/scrypt-modified":{"post":{"summary":"Create User with Scrypt Modified Password","operationId":"usersCreateScryptModifiedUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createScryptModifiedUser","weight":167,"cookies":false,"type":"","demo":"users\/create-scrypt-modified-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-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 `ID.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 hashed using Scrypt Modified.","x-example":"password"},"passwordSalt":{"type":"string","description":"Salt used to hash password.","x-example":"[PASSWORD_SALT]"},"passwordSaltSeparator":{"type":"string","description":"Salt separator used to hash password.","x-example":"[PASSWORD_SALT_SEPARATOR]"},"passwordSignerKey":{"type":"string","description":"Signer key used to hash password.","x-example":"[PASSWORD_SIGNER_KEY]"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordSaltSeparator","passwordSignerKey"]}}}}}},"\/users\/sha":{"post":{"summary":"Create User with SHA Password","operationId":"usersCreateSHAUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createSHAUser","weight":164,"cookies":false,"type":"","demo":"users\/create-s-h-a-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-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 `ID.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 hashed using SHA.","x-example":"password"},"passwordVersion":{"type":"string","description":"Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'","x-example":"sha1"},"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":186,"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":169,"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, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":185,"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":179,"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":"List User Logs","operationId":"usersListLogs","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":"listLogs","weight":173,"cookies":false,"type":"","demo":"users\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"List User Memberships","operationId":"usersListMemberships","tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"listMemberships","weight":172,"cookies":false,"type":"","demo":"users\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.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"}]}},"\/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":177,"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":178,"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}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":180,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.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":{"number":{"type":"string","description":"User phone number.","x-example":"+12065550100"}},"required":["number"]}}}}}},"\/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":170,"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":182,"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":"List User Sessions","operationId":"usersListSessions","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":"listSessions","weight":171,"cookies":false,"type":"","demo":"users\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":184,"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":183,"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. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":174,"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":"usersUpdateEmailVerification","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":"updateEmailVerification","weight":181,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-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"]}}}}}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":176,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-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":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","x-example":false}},"required":["phoneVerification"]}}}}}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","x-globalAttributes":[]},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.","x-globalAttributes":[]},{"name":"databases","description":"The Databases service allows you to create structured collections of documents, query and filter lists of documents","x-globalAttributes":["databaseId"]},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location.","x-globalAttributes":[]},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health.","x-globalAttributes":[]},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"storage","description":"The Storage service allows you to manage your project files.","x-globalAttributes":[]},{"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","x-globalAttributes":[]},{"name":"users","description":"The Users service allows you to manage your project users.","x-globalAttributes":[]},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions.","x-globalAttributes":[]}],"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"]},"databaseList":{"description":"Databases List","type":"object","properties":{"total":{"type":"integer","description":"Total number of databases documents that matched your query.","x-example":5,"format":"int32"},"databases":{"type":"array","description":"List of databases.","items":{"$ref":"#\/components\/schemas\/database"},"x-example":""}},"required":["total","databases"]},"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"]},"variableList":{"description":"Variables List","type":"object","properties":{"total":{"type":"integer","description":"Total number of variables documents that matched your query.","x-example":5,"format":"int32"},"variables":{"type":"array","description":"List of variables.","items":{"$ref":"#\/components\/schemas\/variable"},"x-example":""}},"required":["total","variables"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"},"$createdAt":{"type":"string","description":"Database creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Database update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","name","$createdAt","$updatedAt"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Collection creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Collection update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Collection permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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\/attributeDatetime"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$permissions","databaseId","name","enabled","documentSecurity","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\/attributeDatetime"},{"$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"]},"attributeDatetime":{"description":"AttributeDatetime","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"birthDay"},"type":{"type":"string","description":"Attribute type.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"ISO 8601 format.","x-example":"datetime"},"default":{"type":"string","description":"Default value for attribute when not provided. Only null is optional","x-example":"2020-10-15T06:38:00.000+00:00","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":[],"nullable":true}},"required":["key","type","status","attributes"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collectionId":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"string","description":"Document creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Document update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Document permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]}},"additionalProperties":true,"required":["$id","$collectionId","$databaseId","$createdAt","$updatedAt","$permissions"]},"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":"string","description":"Log creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"password":{"type":"string","description":"Hashed user password.","x-example":"$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE"},"hash":{"type":"string","description":"Password hashing algorithm.","x-example":"argon2"},"hashOptions":{"type":"object","description":"Password hashing algorithm configuration.","x-example":{},"items":{"oneOf":[{"$ref":"#\/components\/schemas\/algoArgon2"},{"$ref":"#\/components\/schemas\/algoScrypt"},{"$ref":"#\/components\/schemas\/algoScryptModified"},{"$ref":"#\/components\/schemas\/algoBcrypt"},{"$ref":"#\/components\/schemas\/algoPhpass"},{"$ref":"#\/components\/schemas\/algoSha"},{"$ref":"#\/components\/schemas\/algoMd5"}]}},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","password","hash","hashOptions","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"algoMd5":{"description":"AlgoMD5","type":"object"},"algoSha":{"description":"AlgoSHA","type":"object"},"algoPhpass":{"description":"AlgoPHPass","type":"object"},"algoBcrypt":{"description":"AlgoBcrypt","type":"object"},"algoScrypt":{"description":"AlgoScrypt","type":"object","properties":{"costCpu":{"type":"integer","description":"CPU complexity of computed hash.","x-example":8,"format":"int32"},"costMemory":{"type":"integer","description":"Memory complexity of computed hash.","x-example":14,"format":"int32"},"costParallel":{"type":"integer","description":"Parallelization of computed hash.","x-example":1,"format":"int32"},"length":{"type":"integer","description":"Length used to compute hash.","x-example":64,"format":"int32"}},"required":["costCpu","costMemory","costParallel","length"]},"algoScryptModified":{"description":"AlgoScryptModified","type":"object","properties":{"salt":{"type":"string","description":"Salt used to compute hash.","x-example":"UxLMreBr6tYyjQ=="},"saltSeparator":{"type":"string","description":"Separator used to compute hash.","x-example":"Bw=="},"signerKey":{"type":"string","description":"Key used to compute hash.","x-example":"XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ=="}},"required":["salt","saltSeparator","signerKey"]},"algoArgon2":{"description":"AlgoArgon2","type":"object","properties":{"memoryCost":{"type":"integer","description":"Memory used to compute hash.","x-example":65536,"format":"int32"},"timeCost":{"type":"integer","description":"Amount of time consumed to compute hash","x-example":4,"format":"int32"},"threads":{"type":"integer","description":"Number of threads used to compute hash.","x-example":3,"format":"int32"}},"required":["memoryCost","timeCost","threads"]},"account":{"description":"Account","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Session creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"string","description":"Session expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"The date of when the access token expires in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","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"},"$createdAt":{"type":"string","description":"Token creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"Token expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","$createdAt","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"},"$createdAt":{"type":"string","description":"File creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"File update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"File permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"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","$createdAt","$updatedAt","$permissions","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Bucket creation time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Bucket update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Bucket permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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"]},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).","x-example":"gzip"},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$createdAt","$updatedAt","$permissions","fileSecurity","name","enabled","maximumFileSize","allowedFileExtensions","compression","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Team creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Team update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Membership creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Membership update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"string","description":"Date, the user has been invited to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"joined":{"type":"string","description":"Date, the user has accepted the invitation to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Function creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Function update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"users"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"enabled":{"type":"boolean","description":"Function enabled.","x-example":false},"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":"array","description":"Function variables.","items":{"$ref":"#\/components\/schemas\/variable"},"x-example":[]},"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":"string","description":"Function's next scheduled execution time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"schedulePrevious":{"type":"string","description":"Function's previous scheduled execution time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","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"},"$createdAt":{"type":"string","description":"Deployment creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Deployment update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Execution creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Execution upate date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Execution roles.","items":{"type":"string"},"x-example":["any"]},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"duration":{"type":"number","description":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Project creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Project update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"authDuration":{"type":"integer","description":"Session duration in seconds.","x-example":60,"format":"int32"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"providers":{"type":"array","description":"List of Providers.","items":{"$ref":"#\/components\/schemas\/provider"},"x-example":{}},"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":{}},"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},"serviceStatusForDatabases":{"type":"boolean","description":"Databases 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","$createdAt","$updatedAt","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authDuration","authLimit","providers","platforms","webhooks","keys","domains","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Webhook creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Webhook update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"signatureKey":{"type":"string","description":"Signature key which can be used to validated incoming","x-example":"ad3d581ca230e2b7059c545e5a"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Key creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Key update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"expire":{"type":"string","description":"Key expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"},"accessedAt":{"type":"string","description":"Most recent access date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"sdks":{"type":"array","description":"List of SDK user agents that used this key.","items":{"type":"string"},"x-example":"appwrite:flutter"}},"required":["$id","$createdAt","$updatedAt","name","expire","scopes","secret","accessedAt","sdks"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Domain creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Domain update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"provider":{"description":"Provider","type":"object","properties":{"name":{"type":"string","description":"Provider name.","x-example":"GitHub"},"appId":{"type":"string","description":"OAuth 2.0 application ID.","x-example":"259125845563242502"},"secret":{"type":"string","description":"OAuth 2.0 application secret. Might be JSON string if provider requires extra configuration.","x-example":"Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ"},"enabled":{"type":"boolean","description":"Provider is active and can be used to create session.","x-example":""}},"required":["name","appId","secret","enabled"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Platform creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Platform update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","name","type","key","store","hostname","httpUser","httpPass"]},"variable":{"description":"Variable","type":"object","properties":{"$id":{"type":"string","description":"Variable ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"key":{"type":"string","description":"Variable key.","x-example":"API_KEY"},"value":{"type":"string","description":"Variable value.","x-example":"myPa$$word1"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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"]},"metric":{"description":"Metric","type":"object","properties":{"value":{"type":"integer","description":"The value of this metric at the timestamp.","x-example":1,"format":"int32"},"date":{"type":"string","description":"The date at which this metric was aggregated in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["value","date"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databasesCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databasesRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databasesUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databasesDelete":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","databasesCount","documentsCount","collectionsCount","databasesCreate","databasesRead","databasesUpdate","databasesDelete","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"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\/metric"},"x-example":[]},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"$ref":"#\/components\/schemas\/metric"},"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\/metric"},"x-example":[]},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"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\/metric"},"x-example":[]},"usersCreate":{"type":"array","description":"Aggregated stats for users created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"usersRead":{"type":"array","description":"Aggregated stats for users read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"usersUpdate":{"type":"array","description":"Aggregated stats for users updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"usersDelete":{"type":"array","description":"Aggregated stats for users deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"sessionsCreate":{"type":"array","description":"Aggregated stats for sessions created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"sessionsProviderCreate":{"type":"array","description":"Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"sessionsDelete":{"type":"array","description":"Aggregated stats for sessions deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"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"},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesCount":{"type":"array","description":"Aggregated stats for total number of files.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsCount":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsCreate":{"type":"array","description":"Aggregated stats for buckets created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsRead":{"type":"array","description":"Aggregated stats for buckets read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsUpdate":{"type":"array","description":"Aggregated stats for buckets updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsDelete":{"type":"array","description":"Aggregated stats for buckets deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","storage","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\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"$ref":"#\/components\/schemas\/metric"},"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"},"executionsTotal":{"type":"array","description":"Aggregated stats for number of function executions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsFailure":{"type":"array","description":"Aggregated stats for function execution failures.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsSuccess":{"type":"array","description":"Aggregated stats for function execution successes.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsTime":{"type":"array","description":"Aggregated stats for function execution duration.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsTotal":{"type":"array","description":"Aggregated stats for number of function builds.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsFailure":{"type":"array","description":"Aggregated stats for function build failures.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsSuccess":{"type":"array","description":"Aggregated stats for function build successes.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsTime":{"type":"array","description":"Aggregated stats for function build duration.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","executionsTotal","executionsFailure","executionsSuccess","executionsTime","buildsTotal","buildsFailure","buildsSuccess","buildsTime"]},"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\/metric"},"x-example":[]},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executions":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documents":{"type":"array","description":"Aggregated stats for number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databases":{"type":"array","description":"Aggregated stats for number of databases.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"users":{"type":"array","description":"Aggregated stats for number of users.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buckets":{"type":"array","description":"Aggregated stats for number of buckets.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","requests","network","executions","documents","databases","users","storage","buckets"]}},"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"}} +{"openapi":"3.0.0","info":{"version":"1.1.2","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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"get","weight":19,"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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"create","weight":7,"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 `ID.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"]}}}}}},"\/account\/email":{"patch":{"summary":"Update 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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateEmail","weight":26,"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\/invite":{"post":{"summary":"Create account using an invite code","operationId":"accountCreateWithInviteCode","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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"createWithInviteCode","weight":6,"cookies":false,"type":"","demo":"account\/create-with-invite-code.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":["console"],"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 `ID.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]"},"code":{"type":"string","description":"An invite code to restrict user signups on the Appwrite console. Users with an invite code will be able to create accounts irrespective of email and IP whitelists.","x-example":"[CODE]"}},"required":["userId","email","password"]}}}}}},"\/account\/jwt":{"post":{"summary":"Create 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":18,"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":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","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":"listLogs","weight":22,"cookies":false,"type":"","demo":"account\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateName","weight":24,"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 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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePassword","weight":25,"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\/phone":{"patch":{"summary":"Update Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.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":{"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["phone","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":20,"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 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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePrefs","weight":28,"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":33,"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":34,"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":"List Sessions","operationId":"accountListSessions","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":"listSessions","weight":21,"cookies":false,"type":"","demo":"account\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":[]}]},"delete":{"summary":"Delete 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":32,"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":17,"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\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","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":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.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"]}}}}}},"\/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. If the provided user ID has not be registered, a new user will be created. 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":13,"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 `ID.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":14,"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 OAuth2 Session","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":9,"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, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","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. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","tags":["account"],"description":"Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-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 `ID.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]"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"}},"required":["userId","phone"]}}}}},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":16,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-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\/{sessionId}":{"get":{"summary":"Get Session","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":23,"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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":31,"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 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":30,"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\/status":{"patch":{"summary":"Update Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateStatus","weight":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.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\/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#accountUpdateEmailVerification). 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":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-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":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-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"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number 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":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":40,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":39,"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":43,"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. Country codes follow the [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":41,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":42,"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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":45,"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":"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.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":44,"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 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","tags":["databases"],"description":"Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.","responses":{"200":{"description":"Databases List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/databaseList"}}}}},"x-appwrite":{"method":"list","weight":47,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","tags":["databases"],"description":"Create a new Database.\n","responses":{"201":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"create","weight":46,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"databaseId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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":"[DATABASE_ID]","x-global":true},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["databaseId","name"]}}}}}},"\/databases\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabases"}}}}},"x-appwrite":{"method":"getUsage","weight":80,"cookies":false,"type":"","demo":"databases\/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"}]}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","tags":["databases"],"description":"Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.","responses":{"200":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"get","weight":48,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","tags":["databases"],"description":"Update a database by its unique ID.","responses":{"200":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"update","weight":50,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Database","operationId":"databasesDelete","tags":["databases"],"description":"Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":51,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","tags":["databases"],"description":"Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"listCollections","weight":53,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","tags":["databases"],"description":"Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"createCollection","weight":52,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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]"},"permissions":{"type":"array","description":"An array of permissions strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","x-example":false}},"required":["collectionId","name"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","tags":["databases"],"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":54,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","tags":["databases"],"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":56,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permission are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","x-example":false}},"required":["name"]}}}}},"delete":{"summary":"Delete Collection","operationId":"databasesDeleteCollection","tags":["databases"],"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":57,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":67,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","tags":["databases"],"description":"Create a boolean attribute.\n","responses":{"202":{"description":"AttributeBoolean","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"createBooleanAttribute","weight":65,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":66,"cookies":false,"type":"","demo":"databases\/create-datetime-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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 the attribute in ISO 8601 format. Cannot be set when attribute is required.","x-example":"2020-10-15T06:38:00.000+00:00"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","tags":["databases"],"description":"Create an email attribute.\n","responses":{"202":{"description":"AttributeEmail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"createEmailAttribute","weight":59,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":60,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 elements are allowed, each 4096 characters long.","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","tags":["databases"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeFloat","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"createFloatAttribute","weight":64,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","tags":["databases"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeInteger","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"createIntegerAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","tags":["databases"],"description":"Create IP address attribute.\n","responses":{"202":{"description":"AttributeIP","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"createIpAttribute","weight":61,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","tags":["databases"],"description":"Create a string attribute.\n","responses":{"202":{"description":"AttributeString","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"createStringAttribute","weight":58,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","tags":["databases"],"description":"Create a URL attribute.\n","responses":{"202":{"description":"AttributeURL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"createUrlAttribute","weight":62,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime, or AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeString","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/attributeDatetime"},{"$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\/attributeDatetime"},{"$ref":"#\/components\/schemas\/attributeString"}]}}}}},"x-appwrite":{"method":"getAttribute","weight":68,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteAttribute","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":69,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","tags":["databases"],"description":"Get a list of all the user's documents in a given collection. You can use the query params to filter your results.","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":75,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","tags":["databases"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":74,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 `ID.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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","tags":["databases"],"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":76,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesUpdateDocument","tags":["databases"],"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":78,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","tags":["databases"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":79,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databasesListDocumentLogs","tags":["databases"],"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":77,"cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":71,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","tags":["databases"],"description":"","responses":{"202":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":70,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 attributes are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","tags":["databases"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":72,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteIndex","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":73,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListCollectionLogs","tags":["databases"],"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":55,"cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageCollection"}}}}},"x-appwrite":{"method":"getCollectionUsage","weight":82,"cookies":false,"type":"","demo":"databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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"}]}},"\/databases\/{databaseId}\/logs":{"get":{"summary":"List Database Logs","operationId":"databasesListLogs","tags":["databases"],"description":"Get the database activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":49,"cookies":false,"type":"","demo":"databases\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabase"}}}}},"x-appwrite":{"method":"getDatabaseUsage","weight":81,"cookies":false,"type":"","demo":"databases\/get-database-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"range","description":"`Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/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":191,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":190,"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 `ID.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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","x-example":false}},"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":192,"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\/usage":{"get":{"summary":"Get Functions Usage","operationId":"functionsGetUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getUsage","weight":195,"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":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/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":193,"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":196,"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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","x-example":"[\"any\"]","items":{"type":"string"}},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","x-example":false}},"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":198,"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":200,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: entrypoint, size, buildId, activate","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":{"202":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":199,"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":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"getDeployment","weight":201,"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":197,"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":202,"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":"Create Build","operationId":"functionsCreateBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":203,"cookies":false,"type":"","demo":"functions\/create-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.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"},{"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.","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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, statusCode, duration","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":"ip:{ip},userId:{userId}","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 in the background. Default value is false.","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":"functionsGetFunctionUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getFunctionUsage","weight":194,"cookies":false,"type":"","demo":"functions\/get-function-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"}]}},"\/functions\/{functionId}\/variables":{"get":{"summary":"List Variables","operationId":"functionsListVariables","tags":["functions"],"description":"Get a list of all variables of a specific function.","responses":{"200":{"description":"Variables List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variableList"}}}}},"x-appwrite":{"method":"listVariables","weight":208,"cookies":false,"type":"","demo":"functions\/list-variables.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-variables.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"post":{"summary":"Create Variable","operationId":"functionsCreateVariable","tags":["functions"],"description":"Create a new function variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"createVariable","weight":207,"cookies":false,"type":"","demo":"functions\/create-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","x-example":"[VALUE]"}},"required":["key","value"]}}}}}},"\/functions\/{functionId}\/variables\/{variableId}":{"get":{"summary":"Get Variable","operationId":"functionsGetVariable","tags":["functions"],"description":"Get a variable by its unique ID.","responses":{"200":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"getVariable","weight":209,"cookies":false,"type":"","demo":"functions\/get-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_ID]"},"in":"path"}]},"put":{"summary":"Update Variable","operationId":"functionsUpdateVariable","tags":["functions"],"description":"Update variable by its unique ID.","responses":{"200":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"updateVariable","weight":210,"cookies":false,"type":"","demo":"functions\/update-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","x-example":"[VALUE]"}},"required":["key"]}}}}},"delete":{"summary":"Delete Variable","operationId":"functionsDeleteVariable","tags":["functions"],"description":"Delete a variable by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteVariable","weight":211,"cookies":false,"type":"","demo":"functions\/delete-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_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":90,"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":102,"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 servers are up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getCache","weight":93,"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 servers are up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getDB","weight":92,"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\/pubsub":{"get":{"summary":"Get PubSub","operationId":"healthGetPubSub","tags":["health"],"description":"Check the Appwrite pub-sub servers are up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getPubSub","weight":95,"cookies":false,"type":"","demo":"health\/get-pub-sub.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.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":{"get":{"summary":"Get Queue","operationId":"healthGetQueue","tags":["health"],"description":"Check the Appwrite queue messaging servers are up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getQueue","weight":94,"cookies":false,"type":"","demo":"health\/get-queue.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.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":99,"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":100,"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":98,"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\/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":97,"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":101,"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":96,"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":83,"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":"localeListContinents","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":"listContinents","weight":87,"cookies":false,"type":"","demo":"locale\/list-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountries","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":"listCountries","weight":84,"cookies":false,"type":"","demo":"locale\/list-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesEU","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":"listCountriesEU","weight":85,"cookies":false,"type":"","demo":"locale\/list-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesPhones","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":"listCountriesPhones","weight":86,"cookies":false,"type":"","demo":"locale\/list-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCurrencies","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":"listCurrencies","weight":88,"cookies":false,"type":"","demo":"locale\/list-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListLanguages","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":"listLanguages","weight":89,"cookies":false,"type":"","demo":"locale\/list-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":[]}]}},"\/project\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectGetUsage","tags":["project"],"description":"","responses":{"200":{"description":"UsageProject","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageProject"}}}}},"x-appwrite":{"method":"getUsage","weight":135,"cookies":false,"type":"","demo":"project\/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":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/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":105,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":104,"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 `ID.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]"},"region":{"type":"string","description":"Project Region.","x-example":"default"},"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":106,"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":107,"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":113,"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\/duration":{"patch":{"summary":"Update Project Authentication Duration","operationId":"projectsUpdateAuthDuration","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthDuration","weight":111,"cookies":false,"type":"","demo":"projects\/update-auth-duration.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":{"duration":{"type":"integer","description":"Project session length in seconds. Max length: 31536000 seconds.","x-example":0}},"required":["duration"]}}}}}},"\/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":110,"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":112,"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":131,"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":130,"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":132,"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":134,"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":133,"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":121,"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":120,"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. Maximum of 100 scopes are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","x-example":"2020-10-15T06:38:00.000+00:00"}},"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":122,"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":123,"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. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["name","scopes"]}}}}},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":124,"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":109,"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]"},"enabled":{"type":"boolean","description":"Provider status. Set to 'false' to disable new session creation.","x-example":false}},"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":126,"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":125,"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":null}},"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":127,"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":128,"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":null}},"required":["name"]}}}}},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":129,"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":108,"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}\/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":115,"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":114,"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. Maximum of 100 events are allowed.","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":116,"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":117,"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. Maximum of 100 events are allowed.","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":119,"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"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhookSignature","weight":118,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.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":137,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":136,"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 `ID.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]"},"permissions":{"type":"array","description":"An array of permission strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","x-example":"none"},"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"]}}}}}},"\/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":138,"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":139,"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","x-example":"none"},"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"]}}}}},"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":140,"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.","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":142,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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\/storage#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":141,"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":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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 `ID.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},"permissions":{"type":"array","description":"An array of permission strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","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":143,"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":147,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":{"permissions":{"type":"array","description":"An array of permission string. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","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":148,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":145,"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":144,"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":146,"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":150,"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 storage bucket","operationId":"storageGetBucketUsage","tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageBuckets"}}}}},"x-appwrite":{"method":"getBucketUsage","weight":149,"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.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":152,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":151,"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 `ID.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). Maximum of 100 roles are allowed, each 32 characters long.","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":153,"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":154,"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":155,"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}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":162,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"List Team Memberships","operationId":"teamsListMemberships","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":"listMemberships","weight":157,"cookies":false,"type":"","demo":"teams\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":156,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","weight":158,"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":159,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":161,"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":160,"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":171,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":163,"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 `ID.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"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"},"password":{"type":"string","description":"Plain text 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"]}}}}}},"\/users\/argon2":{"post":{"summary":"Create User with Argon2 Password","operationId":"usersCreateArgon2User","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createArgon2User","weight":166,"cookies":false,"type":"","demo":"users\/create-argon2user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-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 `ID.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 hashed using Argon2.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/bcrypt":{"post":{"summary":"Create User with Bcrypt Password","operationId":"usersCreateBcryptUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createBcryptUser","weight":164,"cookies":false,"type":"","demo":"users\/create-bcrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-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 `ID.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 hashed using Bcrypt.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/md5":{"post":{"summary":"Create User with MD5 Password","operationId":"usersCreateMD5User","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createMD5User","weight":165,"cookies":false,"type":"","demo":"users\/create-m-d5user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-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 `ID.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 hashed using MD5.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/phpass":{"post":{"summary":"Create User with PHPass Password","operationId":"usersCreatePHPassUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createPHPassUser","weight":168,"cookies":false,"type":"","demo":"users\/create-p-h-pass-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-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 `ID.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 hashed using PHPass.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/scrypt":{"post":{"summary":"Create User with Scrypt Password","operationId":"usersCreateScryptUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createScryptUser","weight":169,"cookies":false,"type":"","demo":"users\/create-scrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-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 `ID.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 hashed using Scrypt.","x-example":"password"},"passwordSalt":{"type":"string","description":"Optional salt used to hash password.","x-example":"[PASSWORD_SALT]"},"passwordCpu":{"type":"integer","description":"Optional CPU cost used to hash password.","x-example":null},"passwordMemory":{"type":"integer","description":"Optional memory cost used to hash password.","x-example":null},"passwordParallel":{"type":"integer","description":"Optional parallelization cost used to hash password.","x-example":null},"passwordLength":{"type":"integer","description":"Optional hash length used to hash password.","x-example":null},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordCpu","passwordMemory","passwordParallel","passwordLength"]}}}}}},"\/users\/scrypt-modified":{"post":{"summary":"Create User with Scrypt Modified Password","operationId":"usersCreateScryptModifiedUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createScryptModifiedUser","weight":170,"cookies":false,"type":"","demo":"users\/create-scrypt-modified-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-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 `ID.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 hashed using Scrypt Modified.","x-example":"password"},"passwordSalt":{"type":"string","description":"Salt used to hash password.","x-example":"[PASSWORD_SALT]"},"passwordSaltSeparator":{"type":"string","description":"Salt separator used to hash password.","x-example":"[PASSWORD_SALT_SEPARATOR]"},"passwordSignerKey":{"type":"string","description":"Signer key used to hash password.","x-example":"[PASSWORD_SIGNER_KEY]"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordSaltSeparator","passwordSignerKey"]}}}}}},"\/users\/sha":{"post":{"summary":"Create User with SHA Password","operationId":"usersCreateSHAUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createSHAUser","weight":167,"cookies":false,"type":"","demo":"users\/create-s-h-a-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-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 `ID.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 hashed using SHA.","x-example":"password"},"passwordVersion":{"type":"string","description":"Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'","x-example":"sha1"},"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":189,"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"}]}},"\/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":172,"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, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":188,"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":182,"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":"List User Logs","operationId":"usersListLogs","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":"listLogs","weight":176,"cookies":false,"type":"","demo":"users\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"List User Memberships","operationId":"usersListMemberships","tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"listMemberships","weight":175,"cookies":false,"type":"","demo":"users\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.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"}]}},"\/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":180,"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":181,"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}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":183,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.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":{"number":{"type":"string","description":"User phone number.","x-example":"+12065550100"}},"required":["number"]}}}}}},"\/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":173,"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":185,"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":"List User Sessions","operationId":"usersListSessions","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":"listSessions","weight":174,"cookies":false,"type":"","demo":"users\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":187,"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":186,"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. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":177,"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":"usersUpdateEmailVerification","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":"updateEmailVerification","weight":184,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-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"]}}}}}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":179,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-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":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","x-example":false}},"required":["phoneVerification"]}}}}}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","x-globalAttributes":[]},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.","x-globalAttributes":[]},{"name":"databases","description":"The Databases service allows you to create structured collections of documents, query and filter lists of documents","x-globalAttributes":["databaseId"]},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location.","x-globalAttributes":[]},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health.","x-globalAttributes":[]},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"project","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"storage","description":"The Storage service allows you to manage your project files.","x-globalAttributes":[]},{"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","x-globalAttributes":[]},{"name":"users","description":"The Users service allows you to manage your project users.","x-globalAttributes":[]},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions.","x-globalAttributes":[]}],"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"]},"databaseList":{"description":"Databases List","type":"object","properties":{"total":{"type":"integer","description":"Total number of databases documents that matched your query.","x-example":5,"format":"int32"},"databases":{"type":"array","description":"List of databases.","items":{"$ref":"#\/components\/schemas\/database"},"x-example":""}},"required":["total","databases"]},"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"]},"variableList":{"description":"Variables List","type":"object","properties":{"total":{"type":"integer","description":"Total number of variables documents that matched your query.","x-example":5,"format":"int32"},"variables":{"type":"array","description":"List of variables.","items":{"$ref":"#\/components\/schemas\/variable"},"x-example":""}},"required":["total","variables"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"},"$createdAt":{"type":"string","description":"Database creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Database update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","name","$createdAt","$updatedAt"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Collection creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Collection update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Collection permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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\/attributeDatetime"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$permissions","databaseId","name","enabled","documentSecurity","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\/attributeDatetime"},{"$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"]},"attributeDatetime":{"description":"AttributeDatetime","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"birthDay"},"type":{"type":"string","description":"Attribute type.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"ISO 8601 format.","x-example":"datetime"},"default":{"type":"string","description":"Default value for attribute when not provided. Only null is optional","x-example":"2020-10-15T06:38:00.000+00:00","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":[],"nullable":true}},"required":["key","type","status","attributes"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collectionId":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"string","description":"Document creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Document update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Document permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]}},"additionalProperties":true,"required":["$id","$collectionId","$databaseId","$createdAt","$updatedAt","$permissions"]},"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":"string","description":"Log creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"password":{"type":"string","description":"Hashed user password.","x-example":"$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE"},"hash":{"type":"string","description":"Password hashing algorithm.","x-example":"argon2"},"hashOptions":{"type":"object","description":"Password hashing algorithm configuration.","x-example":{},"items":{"oneOf":[{"$ref":"#\/components\/schemas\/algoArgon2"},{"$ref":"#\/components\/schemas\/algoScrypt"},{"$ref":"#\/components\/schemas\/algoScryptModified"},{"$ref":"#\/components\/schemas\/algoBcrypt"},{"$ref":"#\/components\/schemas\/algoPhpass"},{"$ref":"#\/components\/schemas\/algoSha"},{"$ref":"#\/components\/schemas\/algoMd5"}]}},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","password","hash","hashOptions","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"algoMd5":{"description":"AlgoMD5","type":"object"},"algoSha":{"description":"AlgoSHA","type":"object"},"algoPhpass":{"description":"AlgoPHPass","type":"object"},"algoBcrypt":{"description":"AlgoBcrypt","type":"object"},"algoScrypt":{"description":"AlgoScrypt","type":"object","properties":{"costCpu":{"type":"integer","description":"CPU complexity of computed hash.","x-example":8,"format":"int32"},"costMemory":{"type":"integer","description":"Memory complexity of computed hash.","x-example":14,"format":"int32"},"costParallel":{"type":"integer","description":"Parallelization of computed hash.","x-example":1,"format":"int32"},"length":{"type":"integer","description":"Length used to compute hash.","x-example":64,"format":"int32"}},"required":["costCpu","costMemory","costParallel","length"]},"algoScryptModified":{"description":"AlgoScryptModified","type":"object","properties":{"salt":{"type":"string","description":"Salt used to compute hash.","x-example":"UxLMreBr6tYyjQ=="},"saltSeparator":{"type":"string","description":"Separator used to compute hash.","x-example":"Bw=="},"signerKey":{"type":"string","description":"Key used to compute hash.","x-example":"XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ=="}},"required":["salt","saltSeparator","signerKey"]},"algoArgon2":{"description":"AlgoArgon2","type":"object","properties":{"memoryCost":{"type":"integer","description":"Memory used to compute hash.","x-example":65536,"format":"int32"},"timeCost":{"type":"integer","description":"Amount of time consumed to compute hash","x-example":4,"format":"int32"},"threads":{"type":"integer","description":"Number of threads used to compute hash.","x-example":3,"format":"int32"}},"required":["memoryCost","timeCost","threads"]},"account":{"description":"Account","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Session creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"string","description":"Session expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"The date of when the access token expires in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","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"},"$createdAt":{"type":"string","description":"Token creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"Token expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","$createdAt","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"},"$createdAt":{"type":"string","description":"File creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"File update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"File permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"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","$createdAt","$updatedAt","$permissions","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Bucket creation time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Bucket update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Bucket permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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"]},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).","x-example":"gzip"},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$createdAt","$updatedAt","$permissions","fileSecurity","name","enabled","maximumFileSize","allowedFileExtensions","compression","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Team creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Team update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Membership creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Membership update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"string","description":"Date, the user has been invited to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"joined":{"type":"string","description":"Date, the user has accepted the invitation to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Function creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Function update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"users"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"enabled":{"type":"boolean","description":"Function enabled.","x-example":false},"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":"array","description":"Function variables.","items":{"$ref":"#\/components\/schemas\/variable"},"x-example":[]},"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 * * *"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","runtime","deployment","vars","events","schedule","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"},"$createdAt":{"type":"string","description":"Deployment creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Deployment update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Execution creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Execution upate date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Execution roles.","items":{"type":"string"},"x-example":["any"]},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"duration":{"type":"number","description":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Project creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Project update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"authDuration":{"type":"integer","description":"Session duration in seconds.","x-example":60,"format":"int32"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"providers":{"type":"array","description":"List of Providers.","items":{"$ref":"#\/components\/schemas\/provider"},"x-example":{}},"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":{}},"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},"serviceStatusForDatabases":{"type":"boolean","description":"Databases 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","$createdAt","$updatedAt","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authDuration","authLimit","providers","platforms","webhooks","keys","domains","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Webhook creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Webhook update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"signatureKey":{"type":"string","description":"Signature key which can be used to validated incoming","x-example":"ad3d581ca230e2b7059c545e5a"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Key creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Key update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"expire":{"type":"string","description":"Key expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"},"accessedAt":{"type":"string","description":"Most recent access date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"sdks":{"type":"array","description":"List of SDK user agents that used this key.","items":{"type":"string"},"x-example":"appwrite:flutter"}},"required":["$id","$createdAt","$updatedAt","name","expire","scopes","secret","accessedAt","sdks"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Domain creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Domain update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"provider":{"description":"Provider","type":"object","properties":{"name":{"type":"string","description":"Provider name.","x-example":"GitHub"},"appId":{"type":"string","description":"OAuth 2.0 application ID.","x-example":"259125845563242502"},"secret":{"type":"string","description":"OAuth 2.0 application secret. Might be JSON string if provider requires extra configuration.","x-example":"Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ"},"enabled":{"type":"boolean","description":"Provider is active and can be used to create session.","x-example":""}},"required":["name","appId","secret","enabled"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Platform creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Platform update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","name","type","key","store","hostname","httpUser","httpPass"]},"variable":{"description":"Variable","type":"object","properties":{"$id":{"type":"string","description":"Variable ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"key":{"type":"string","description":"Variable key.","x-example":"API_KEY"},"value":{"type":"string","description":"Variable value.","x-example":"myPa$$word1"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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":{"name":{"type":"string","description":"Name of the service.","x-example":"database"},"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":["name","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"]},"metric":{"description":"Metric","type":"object","properties":{"value":{"type":"integer","description":"The value of this metric at the timestamp.","x-example":1,"format":"int32"},"date":{"type":"string","description":"The date at which this metric was aggregated in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["value","date"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","databasesTotal","collectionsTotal","documentsTotal"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","collectionsTotal","documentsTotal"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","documentsTotal"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersTotal":{"type":"array","description":"Aggregated stats for total number of users.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"sessionsTotal":{"type":"array","description":"Aggregated stats for sessions created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","usersTotal","sessionsTotal"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"bucketsTotal":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","bucketsTotal","filesTotal","storage"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","filesTotal","filesStorage"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsTotal":{"type":"array","description":"Aggregated stats for number of functions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"deploymentsTotal":{"type":"array","description":"Aggregated stats for number of function deployments.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"deploymentsStorage":{"type":"array","description":"Aggregated stats for function deployments storage.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsTotal":{"type":"array","description":"Aggregated stats for number of function builds.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsStorage":{"type":"array","description":"Aggregated stats for builds storage.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsTime":{"type":"array","description":"Aggregated stats for function build compute.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for number of function executions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsTime":{"type":"array","description":"Aggregated stats for function execution compute.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","functionsTotal","deploymentsTotal","deploymentsStorage","buildsTotal","buildsStorage","buildsTime","executionsTotal","executionsTime"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requestsTotal":{"type":"array","description":"Aggregated stats for number of requests.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databasesTotal":{"type":"array","description":"Aggregated stats for number of databases.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"usersTotal":{"type":"array","description":"Aggregated stats for number of users.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsTotal":{"type":"array","description":"Aggregated stats for number of buckets.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","requestsTotal","network","executionsTotal","documentsTotal","databasesTotal","usersTotal","filesStorage","bucketsTotal"]}},"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 925f9eb2f..70a40c55f 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":"1.1.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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"get","weight":18,"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":[]}]}},"\/account\/email":{"patch":{"summary":"Update 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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateEmail","weight":25,"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":"List Logs","operationId":"accountListLogs","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":"listLogs","weight":21,"cookies":false,"type":"","demo":"account\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateName","weight":23,"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 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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePassword","weight":24,"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\/phone":{"patch":{"summary":"Update Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePhone","weight":26,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.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":{"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["phone","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":19,"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 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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePrefs","weight":27,"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":32,"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":33,"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":"List Sessions","operationId":"accountListSessions","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":"listSessions","weight":20,"cookies":false,"type":"","demo":"account\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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 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":31,"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","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":22,"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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":30,"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 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":29,"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\/status":{"patch":{"summary":"Update Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateStatus","weight":28,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.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\/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#accountUpdateEmailVerification). 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":34,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-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":35,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-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"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":36,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number 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":"updatePhoneVerification","weight":37,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":39,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":38,"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":42,"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. Country codes follow the [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":40,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":41,"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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":44,"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":"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.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":43,"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 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","tags":["databases"],"description":"Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.","responses":{"200":{"description":"Databases List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/databaseList"}}}}},"x-appwrite":{"method":"list","weight":46,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","tags":["databases"],"description":"Create a new Database.\n","responses":{"201":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"create","weight":45,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"databaseId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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":"[DATABASE_ID]","x-global":true},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["databaseId","name"]}}}}}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","tags":["databases"],"description":"Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.","responses":{"200":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"get","weight":47,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","tags":["databases"],"description":"Update a database by its unique ID.","responses":{"200":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"update","weight":49,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Database","operationId":"databasesDelete","tags":["databases"],"description":"Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":50,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","tags":["databases"],"description":"Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"listCollections","weight":52,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","tags":["databases"],"description":"Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"createCollection","weight":51,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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]"},"permissions":{"type":"array","description":"An array of permissions strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","x-example":false}},"required":["collectionId","name"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","tags":["databases"],"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":53,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","tags":["databases"],"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":55,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permission are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","x-example":false}},"required":["name"]}}}}},"delete":{"summary":"Delete Collection","operationId":"databasesDeleteCollection","tags":["databases"],"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":56,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":66,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","tags":["databases"],"description":"Create a boolean attribute.\n","responses":{"202":{"description":"AttributeBoolean","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"createBooleanAttribute","weight":64,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":65,"cookies":false,"type":"","demo":"databases\/create-datetime-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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 the attribute in ISO 8601 format. Cannot be set when attribute is required.","x-example":"2020-10-15T06:38:00.000+00:00"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","tags":["databases"],"description":"Create an email attribute.\n","responses":{"202":{"description":"AttributeEmail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"createEmailAttribute","weight":58,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":59,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 elements are allowed, each 4096 characters long.","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","tags":["databases"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeFloat","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"createFloatAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","tags":["databases"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeInteger","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"createIntegerAttribute","weight":62,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","tags":["databases"],"description":"Create IP address attribute.\n","responses":{"202":{"description":"AttributeIP","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"createIpAttribute","weight":60,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","tags":["databases"],"description":"Create a string attribute.\n","responses":{"202":{"description":"AttributeString","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"createStringAttribute","weight":57,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","tags":["databases"],"description":"Create a URL attribute.\n","responses":{"202":{"description":"AttributeURL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"createUrlAttribute","weight":61,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime, or AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeString","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/attributeDatetime"},{"$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\/attributeDatetime"},{"$ref":"#\/components\/schemas\/attributeString"}]}}}}},"x-appwrite":{"method":"getAttribute","weight":67,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteAttribute","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":68,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","tags":["databases"],"description":"Get a list of all the user's documents in a given collection. You can use the query params to filter your results.","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":74,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","tags":["databases"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":73,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 `ID.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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","tags":["databases"],"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":75,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesUpdateDocument","tags":["databases"],"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":77,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","tags":["databases"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":78,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":70,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","tags":["databases"],"description":"","responses":{"202":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":69,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 attributes are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","tags":["databases"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":71,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteIndex","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":72,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":188,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":187,"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 `ID.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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","x-example":false}},"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":189,"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":190,"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":193,"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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","x-example":"[\"any\"]","items":{"type":"string"}},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","x-example":false}},"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":195,"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":197,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: entrypoint, size, buildId, activate","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":{"202":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":196,"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":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"getDeployment","weight":198,"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":194,"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":199,"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":"Create Build","operationId":"functionsCreateBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":200,"cookies":false,"type":"","demo":"functions\/create-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.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"},{"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.","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":202,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, statusCode, duration","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":201,"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":"ip:{ip},userId:{userId}","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 in the background. Default value is false.","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":203,"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"}]}},"\/functions\/{functionId}\/variables":{"get":{"summary":"List Variables","operationId":"functionsListVariables","tags":["functions"],"description":"Get a list of all variables of a specific function.","responses":{"200":{"description":"Variables List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variableList"}}}}},"x-appwrite":{"method":"listVariables","weight":205,"cookies":false,"type":"","demo":"functions\/list-variables.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-variables.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"post":{"summary":"Create Variable","operationId":"functionsCreateVariable","tags":["functions"],"description":"Create a new function variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"createVariable","weight":204,"cookies":false,"type":"","demo":"functions\/create-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","x-example":"[VALUE]"}},"required":["key","value"]}}}}}},"\/functions\/{functionId}\/variables\/{variableId}":{"get":{"summary":"Get Variable","operationId":"functionsGetVariable","tags":["functions"],"description":"Get a variable by its unique ID.","responses":{"200":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"getVariable","weight":206,"cookies":false,"type":"","demo":"functions\/get-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_ID]"},"in":"path"}]},"put":{"summary":"Update Variable","operationId":"functionsUpdateVariable","tags":["functions"],"description":"Update variable by its unique ID.","responses":{"200":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"updateVariable","weight":207,"cookies":false,"type":"","demo":"functions\/update-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","x-example":"[VALUE]"}},"required":["key"]}}}}},"delete":{"summary":"Delete Variable","operationId":"functionsDeleteVariable","tags":["functions"],"description":"Delete a variable by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteVariable","weight":208,"cookies":false,"type":"","demo":"functions\/delete-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_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":89,"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":99,"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":92,"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":91,"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":96,"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":97,"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":95,"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\/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":94,"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":98,"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":93,"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":82,"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":"localeListContinents","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":"listContinents","weight":86,"cookies":false,"type":"","demo":"locale\/list-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountries","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":"listCountries","weight":83,"cookies":false,"type":"","demo":"locale\/list-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesEU","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":"listCountriesEU","weight":84,"cookies":false,"type":"","demo":"locale\/list-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesPhones","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":"listCountriesPhones","weight":85,"cookies":false,"type":"","demo":"locale\/list-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCurrencies","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":"listCurrencies","weight":87,"cookies":false,"type":"","demo":"locale\/list-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListLanguages","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":"listLanguages","weight":88,"cookies":false,"type":"","demo":"locale\/list-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":134,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":133,"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 `ID.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]"},"permissions":{"type":"array","description":"An array of permission strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","x-example":"none"},"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"]}}}}}},"\/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":135,"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":136,"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","x-example":"none"},"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"]}}}}},"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":137,"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.","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":139,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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\/storage#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":138,"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":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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 `ID.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},"permissions":{"type":"array","description":"An array of permission strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","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":140,"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":144,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":{"permissions":{"type":"array","description":"An array of permission string. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","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":145,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":142,"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":141,"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":143,"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.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":149,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":148,"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 `ID.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). Maximum of 100 roles are allowed, each 32 characters long.","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":150,"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":151,"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":152,"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":"List Team Memberships","operationId":"teamsListMemberships","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":"listMemberships","weight":154,"cookies":false,"type":"","demo":"teams\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":153,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","weight":155,"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":156,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":158,"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":157,"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":168,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":160,"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 `ID.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"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"},"password":{"type":"string","description":"Plain text 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"]}}}}}},"\/users\/argon2":{"post":{"summary":"Create User with Argon2 Password","operationId":"usersCreateArgon2User","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createArgon2User","weight":163,"cookies":false,"type":"","demo":"users\/create-argon2user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-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 `ID.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 hashed using Argon2.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/bcrypt":{"post":{"summary":"Create User with Bcrypt Password","operationId":"usersCreateBcryptUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createBcryptUser","weight":161,"cookies":false,"type":"","demo":"users\/create-bcrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-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 `ID.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 hashed using Bcrypt.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/md5":{"post":{"summary":"Create User with MD5 Password","operationId":"usersCreateMD5User","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createMD5User","weight":162,"cookies":false,"type":"","demo":"users\/create-m-d5user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-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 `ID.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 hashed using MD5.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/phpass":{"post":{"summary":"Create User with PHPass Password","operationId":"usersCreatePHPassUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createPHPassUser","weight":165,"cookies":false,"type":"","demo":"users\/create-p-h-pass-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-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 `ID.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 hashed using PHPass.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/scrypt":{"post":{"summary":"Create User with Scrypt Password","operationId":"usersCreateScryptUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createScryptUser","weight":166,"cookies":false,"type":"","demo":"users\/create-scrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-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 `ID.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 hashed using Scrypt.","x-example":"password"},"passwordSalt":{"type":"string","description":"Optional salt used to hash password.","x-example":"[PASSWORD_SALT]"},"passwordCpu":{"type":"integer","description":"Optional CPU cost used to hash password.","x-example":null},"passwordMemory":{"type":"integer","description":"Optional memory cost used to hash password.","x-example":null},"passwordParallel":{"type":"integer","description":"Optional parallelization cost used to hash password.","x-example":null},"passwordLength":{"type":"integer","description":"Optional hash length used to hash password.","x-example":null},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordCpu","passwordMemory","passwordParallel","passwordLength"]}}}}}},"\/users\/scrypt-modified":{"post":{"summary":"Create User with Scrypt Modified Password","operationId":"usersCreateScryptModifiedUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createScryptModifiedUser","weight":167,"cookies":false,"type":"","demo":"users\/create-scrypt-modified-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-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 `ID.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 hashed using Scrypt Modified.","x-example":"password"},"passwordSalt":{"type":"string","description":"Salt used to hash password.","x-example":"[PASSWORD_SALT]"},"passwordSaltSeparator":{"type":"string","description":"Salt separator used to hash password.","x-example":"[PASSWORD_SALT_SEPARATOR]"},"passwordSignerKey":{"type":"string","description":"Signer key used to hash password.","x-example":"[PASSWORD_SIGNER_KEY]"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordSaltSeparator","passwordSignerKey"]}}}}}},"\/users\/sha":{"post":{"summary":"Create User with SHA Password","operationId":"usersCreateSHAUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createSHAUser","weight":164,"cookies":false,"type":"","demo":"users\/create-s-h-a-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-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 `ID.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 hashed using SHA.","x-example":"password"},"passwordVersion":{"type":"string","description":"Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'","x-example":"sha1"},"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":169,"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, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":185,"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":179,"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":"List User Logs","operationId":"usersListLogs","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":"listLogs","weight":173,"cookies":false,"type":"","demo":"users\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"List User Memberships","operationId":"usersListMemberships","tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"listMemberships","weight":172,"cookies":false,"type":"","demo":"users\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.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"}]}},"\/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":177,"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":178,"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}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":180,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.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":{"number":{"type":"string","description":"User phone number.","x-example":"+12065550100"}},"required":["number"]}}}}}},"\/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":170,"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":182,"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":"List User Sessions","operationId":"usersListSessions","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":"listSessions","weight":171,"cookies":false,"type":"","demo":"users\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":184,"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":183,"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. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":174,"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":"usersUpdateEmailVerification","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":"updateEmailVerification","weight":181,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-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"]}}}}}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":176,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-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":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","x-example":false}},"required":["phoneVerification"]}}}}}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","x-globalAttributes":[]},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.","x-globalAttributes":[]},{"name":"databases","description":"The Databases service allows you to create structured collections of documents, query and filter lists of documents","x-globalAttributes":["databaseId"]},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location.","x-globalAttributes":[]},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health.","x-globalAttributes":[]},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"storage","description":"The Storage service allows you to manage your project files.","x-globalAttributes":[]},{"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","x-globalAttributes":[]},{"name":"users","description":"The Users service allows you to manage your project users.","x-globalAttributes":[]},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions.","x-globalAttributes":[]}],"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"]},"databaseList":{"description":"Databases List","type":"object","properties":{"total":{"type":"integer","description":"Total number of databases documents that matched your query.","x-example":5,"format":"int32"},"databases":{"type":"array","description":"List of databases.","items":{"$ref":"#\/components\/schemas\/database"},"x-example":""}},"required":["total","databases"]},"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"]},"variableList":{"description":"Variables List","type":"object","properties":{"total":{"type":"integer","description":"Total number of variables documents that matched your query.","x-example":5,"format":"int32"},"variables":{"type":"array","description":"List of variables.","items":{"$ref":"#\/components\/schemas\/variable"},"x-example":""}},"required":["total","variables"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"},"$createdAt":{"type":"string","description":"Database creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Database update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","name","$createdAt","$updatedAt"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Collection creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Collection update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Collection permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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\/attributeDatetime"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$permissions","databaseId","name","enabled","documentSecurity","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\/attributeDatetime"},{"$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"]},"attributeDatetime":{"description":"AttributeDatetime","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"birthDay"},"type":{"type":"string","description":"Attribute type.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"ISO 8601 format.","x-example":"datetime"},"default":{"type":"string","description":"Default value for attribute when not provided. Only null is optional","x-example":"2020-10-15T06:38:00.000+00:00","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":[],"nullable":true}},"required":["key","type","status","attributes"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collectionId":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"string","description":"Document creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Document update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Document permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]}},"additionalProperties":true,"required":["$id","$collectionId","$databaseId","$createdAt","$updatedAt","$permissions"]},"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":"string","description":"Log creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"password":{"type":"string","description":"Hashed user password.","x-example":"$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE"},"hash":{"type":"string","description":"Password hashing algorithm.","x-example":"argon2"},"hashOptions":{"type":"object","description":"Password hashing algorithm configuration.","x-example":{},"items":{"oneOf":[{"$ref":"#\/components\/schemas\/algoArgon2"},{"$ref":"#\/components\/schemas\/algoScrypt"},{"$ref":"#\/components\/schemas\/algoScryptModified"},{"$ref":"#\/components\/schemas\/algoBcrypt"},{"$ref":"#\/components\/schemas\/algoPhpass"},{"$ref":"#\/components\/schemas\/algoSha"},{"$ref":"#\/components\/schemas\/algoMd5"}]}},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","password","hash","hashOptions","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"algoMd5":{"description":"AlgoMD5","type":"object"},"algoSha":{"description":"AlgoSHA","type":"object"},"algoPhpass":{"description":"AlgoPHPass","type":"object"},"algoBcrypt":{"description":"AlgoBcrypt","type":"object"},"algoScrypt":{"description":"AlgoScrypt","type":"object","properties":{"costCpu":{"type":"integer","description":"CPU complexity of computed hash.","x-example":8,"format":"int32"},"costMemory":{"type":"integer","description":"Memory complexity of computed hash.","x-example":14,"format":"int32"},"costParallel":{"type":"integer","description":"Parallelization of computed hash.","x-example":1,"format":"int32"},"length":{"type":"integer","description":"Length used to compute hash.","x-example":64,"format":"int32"}},"required":["costCpu","costMemory","costParallel","length"]},"algoScryptModified":{"description":"AlgoScryptModified","type":"object","properties":{"salt":{"type":"string","description":"Salt used to compute hash.","x-example":"UxLMreBr6tYyjQ=="},"saltSeparator":{"type":"string","description":"Separator used to compute hash.","x-example":"Bw=="},"signerKey":{"type":"string","description":"Key used to compute hash.","x-example":"XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ=="}},"required":["salt","saltSeparator","signerKey"]},"algoArgon2":{"description":"AlgoArgon2","type":"object","properties":{"memoryCost":{"type":"integer","description":"Memory used to compute hash.","x-example":65536,"format":"int32"},"timeCost":{"type":"integer","description":"Amount of time consumed to compute hash","x-example":4,"format":"int32"},"threads":{"type":"integer","description":"Number of threads used to compute hash.","x-example":3,"format":"int32"}},"required":["memoryCost","timeCost","threads"]},"account":{"description":"Account","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Session creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"string","description":"Session expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"The date of when the access token expires in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","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"},"$createdAt":{"type":"string","description":"Token creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"Token expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","$createdAt","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"},"$createdAt":{"type":"string","description":"File creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"File update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"File permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"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","$createdAt","$updatedAt","$permissions","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Bucket creation time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Bucket update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Bucket permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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"]},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).","x-example":"gzip"},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$createdAt","$updatedAt","$permissions","fileSecurity","name","enabled","maximumFileSize","allowedFileExtensions","compression","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Team creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Team update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Membership creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Membership update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"string","description":"Date, the user has been invited to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"joined":{"type":"string","description":"Date, the user has accepted the invitation to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Function creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Function update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"users"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"enabled":{"type":"boolean","description":"Function enabled.","x-example":false},"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":"array","description":"Function variables.","items":{"$ref":"#\/components\/schemas\/variable"},"x-example":[]},"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":"string","description":"Function's next scheduled execution time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"schedulePrevious":{"type":"string","description":"Function's previous scheduled execution time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","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"},"$createdAt":{"type":"string","description":"Deployment creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Deployment update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Execution creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Execution upate date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Execution roles.","items":{"type":"string"},"x-example":["any"]},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"duration":{"type":"number","description":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"variable":{"description":"Variable","type":"object","properties":{"$id":{"type":"string","description":"Variable ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"key":{"type":"string","description":"Variable key.","x-example":"API_KEY"},"value":{"type":"string","description":"Variable value.","x-example":"myPa$$word1"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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"}} +{"openapi":"3.0.0","info":{"version":"1.1.2","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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"get","weight":19,"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":[]}]}},"\/account\/email":{"patch":{"summary":"Update 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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateEmail","weight":26,"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":"List Logs","operationId":"accountListLogs","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":"listLogs","weight":22,"cookies":false,"type":"","demo":"account\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateName","weight":24,"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 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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePassword","weight":25,"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\/phone":{"patch":{"summary":"Update Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.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":{"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["phone","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":20,"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 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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePrefs","weight":28,"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":33,"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":34,"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":"List Sessions","operationId":"accountListSessions","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":"listSessions","weight":21,"cookies":false,"type":"","demo":"account\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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 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":32,"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","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":23,"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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":31,"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 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":30,"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\/status":{"patch":{"summary":"Update Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateStatus","weight":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.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\/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#accountUpdateEmailVerification). 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":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-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":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-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"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number 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":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":40,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":39,"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":43,"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. Country codes follow the [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":41,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":42,"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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":45,"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":"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.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":44,"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 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","tags":["databases"],"description":"Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.","responses":{"200":{"description":"Databases List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/databaseList"}}}}},"x-appwrite":{"method":"list","weight":47,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","tags":["databases"],"description":"Create a new Database.\n","responses":{"201":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"create","weight":46,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"databaseId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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":"[DATABASE_ID]","x-global":true},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["databaseId","name"]}}}}}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","tags":["databases"],"description":"Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.","responses":{"200":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"get","weight":48,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","tags":["databases"],"description":"Update a database by its unique ID.","responses":{"200":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"update","weight":50,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Database","operationId":"databasesDelete","tags":["databases"],"description":"Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":51,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","tags":["databases"],"description":"Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"listCollections","weight":53,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","tags":["databases"],"description":"Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"createCollection","weight":52,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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]"},"permissions":{"type":"array","description":"An array of permissions strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","x-example":false}},"required":["collectionId","name"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","tags":["databases"],"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":54,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","tags":["databases"],"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":56,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permission are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","x-example":false}},"required":["name"]}}}}},"delete":{"summary":"Delete Collection","operationId":"databasesDeleteCollection","tags":["databases"],"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":57,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":67,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","tags":["databases"],"description":"Create a boolean attribute.\n","responses":{"202":{"description":"AttributeBoolean","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"createBooleanAttribute","weight":65,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":66,"cookies":false,"type":"","demo":"databases\/create-datetime-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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 the attribute in ISO 8601 format. Cannot be set when attribute is required.","x-example":"2020-10-15T06:38:00.000+00:00"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","tags":["databases"],"description":"Create an email attribute.\n","responses":{"202":{"description":"AttributeEmail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"createEmailAttribute","weight":59,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":60,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 elements are allowed, each 4096 characters long.","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","tags":["databases"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeFloat","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"createFloatAttribute","weight":64,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","tags":["databases"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeInteger","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"createIntegerAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","tags":["databases"],"description":"Create IP address attribute.\n","responses":{"202":{"description":"AttributeIP","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"createIpAttribute","weight":61,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","tags":["databases"],"description":"Create a string attribute.\n","responses":{"202":{"description":"AttributeString","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"createStringAttribute","weight":58,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","tags":["databases"],"description":"Create a URL attribute.\n","responses":{"202":{"description":"AttributeURL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"createUrlAttribute","weight":62,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime, or AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeString","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/attributeDatetime"},{"$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\/attributeDatetime"},{"$ref":"#\/components\/schemas\/attributeString"}]}}}}},"x-appwrite":{"method":"getAttribute","weight":68,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteAttribute","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":69,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","tags":["databases"],"description":"Get a list of all the user's documents in a given collection. You can use the query params to filter your results.","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":75,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","tags":["databases"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":74,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 `ID.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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","tags":["databases"],"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":76,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesUpdateDocument","tags":["databases"],"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":78,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","tags":["databases"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":79,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":71,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","tags":["databases"],"description":"","responses":{"202":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":70,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 attributes are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","tags":["databases"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":72,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteIndex","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":73,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":191,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":190,"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 `ID.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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","x-example":false}},"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":192,"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":193,"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":196,"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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","x-example":"[\"any\"]","items":{"type":"string"}},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","x-example":false}},"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":198,"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":200,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: entrypoint, size, buildId, activate","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":{"202":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":199,"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":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"getDeployment","weight":201,"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":197,"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":202,"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":"Create Build","operationId":"functionsCreateBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":203,"cookies":false,"type":"","demo":"functions\/create-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.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"},{"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.","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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, statusCode, duration","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":"ip:{ip},userId:{userId}","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 in the background. Default value is false.","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"}]}},"\/functions\/{functionId}\/variables":{"get":{"summary":"List Variables","operationId":"functionsListVariables","tags":["functions"],"description":"Get a list of all variables of a specific function.","responses":{"200":{"description":"Variables List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variableList"}}}}},"x-appwrite":{"method":"listVariables","weight":208,"cookies":false,"type":"","demo":"functions\/list-variables.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-variables.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"post":{"summary":"Create Variable","operationId":"functionsCreateVariable","tags":["functions"],"description":"Create a new function variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"createVariable","weight":207,"cookies":false,"type":"","demo":"functions\/create-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","x-example":"[VALUE]"}},"required":["key","value"]}}}}}},"\/functions\/{functionId}\/variables\/{variableId}":{"get":{"summary":"Get Variable","operationId":"functionsGetVariable","tags":["functions"],"description":"Get a variable by its unique ID.","responses":{"200":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"getVariable","weight":209,"cookies":false,"type":"","demo":"functions\/get-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_ID]"},"in":"path"}]},"put":{"summary":"Update Variable","operationId":"functionsUpdateVariable","tags":["functions"],"description":"Update variable by its unique ID.","responses":{"200":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"updateVariable","weight":210,"cookies":false,"type":"","demo":"functions\/update-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","x-example":"[VALUE]"}},"required":["key"]}}}}},"delete":{"summary":"Delete Variable","operationId":"functionsDeleteVariable","tags":["functions"],"description":"Delete a variable by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteVariable","weight":211,"cookies":false,"type":"","demo":"functions\/delete-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_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":90,"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":102,"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 servers are up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getCache","weight":93,"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 servers are up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getDB","weight":92,"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\/pubsub":{"get":{"summary":"Get PubSub","operationId":"healthGetPubSub","tags":["health"],"description":"Check the Appwrite pub-sub servers are up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getPubSub","weight":95,"cookies":false,"type":"","demo":"health\/get-pub-sub.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.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":{"get":{"summary":"Get Queue","operationId":"healthGetQueue","tags":["health"],"description":"Check the Appwrite queue messaging servers are up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getQueue","weight":94,"cookies":false,"type":"","demo":"health\/get-queue.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.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":99,"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":100,"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":98,"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\/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":97,"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":101,"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":96,"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":83,"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":"localeListContinents","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":"listContinents","weight":87,"cookies":false,"type":"","demo":"locale\/list-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountries","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":"listCountries","weight":84,"cookies":false,"type":"","demo":"locale\/list-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesEU","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":"listCountriesEU","weight":85,"cookies":false,"type":"","demo":"locale\/list-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesPhones","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":"listCountriesPhones","weight":86,"cookies":false,"type":"","demo":"locale\/list-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCurrencies","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":"listCurrencies","weight":88,"cookies":false,"type":"","demo":"locale\/list-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListLanguages","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":"listLanguages","weight":89,"cookies":false,"type":"","demo":"locale\/list-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":137,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":136,"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 `ID.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]"},"permissions":{"type":"array","description":"An array of permission strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","x-example":"none"},"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"]}}}}}},"\/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":138,"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":139,"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","x-example":"none"},"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"]}}}}},"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":140,"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.","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":142,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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\/storage#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":141,"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":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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 `ID.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},"permissions":{"type":"array","description":"An array of permission strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","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":143,"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":147,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":{"permissions":{"type":"array","description":"An array of permission string. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","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":148,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":145,"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":144,"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":146,"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.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":152,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":151,"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 `ID.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). Maximum of 100 roles are allowed, each 32 characters long.","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":153,"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":154,"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":155,"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":"List Team Memberships","operationId":"teamsListMemberships","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":"listMemberships","weight":157,"cookies":false,"type":"","demo":"teams\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":156,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","weight":158,"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":159,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":161,"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":160,"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":171,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":163,"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 `ID.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"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"},"password":{"type":"string","description":"Plain text 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"]}}}}}},"\/users\/argon2":{"post":{"summary":"Create User with Argon2 Password","operationId":"usersCreateArgon2User","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createArgon2User","weight":166,"cookies":false,"type":"","demo":"users\/create-argon2user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-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 `ID.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 hashed using Argon2.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/bcrypt":{"post":{"summary":"Create User with Bcrypt Password","operationId":"usersCreateBcryptUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createBcryptUser","weight":164,"cookies":false,"type":"","demo":"users\/create-bcrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-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 `ID.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 hashed using Bcrypt.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/md5":{"post":{"summary":"Create User with MD5 Password","operationId":"usersCreateMD5User","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createMD5User","weight":165,"cookies":false,"type":"","demo":"users\/create-m-d5user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-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 `ID.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 hashed using MD5.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/phpass":{"post":{"summary":"Create User with PHPass Password","operationId":"usersCreatePHPassUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createPHPassUser","weight":168,"cookies":false,"type":"","demo":"users\/create-p-h-pass-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-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 `ID.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 hashed using PHPass.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/scrypt":{"post":{"summary":"Create User with Scrypt Password","operationId":"usersCreateScryptUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createScryptUser","weight":169,"cookies":false,"type":"","demo":"users\/create-scrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-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 `ID.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 hashed using Scrypt.","x-example":"password"},"passwordSalt":{"type":"string","description":"Optional salt used to hash password.","x-example":"[PASSWORD_SALT]"},"passwordCpu":{"type":"integer","description":"Optional CPU cost used to hash password.","x-example":null},"passwordMemory":{"type":"integer","description":"Optional memory cost used to hash password.","x-example":null},"passwordParallel":{"type":"integer","description":"Optional parallelization cost used to hash password.","x-example":null},"passwordLength":{"type":"integer","description":"Optional hash length used to hash password.","x-example":null},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordCpu","passwordMemory","passwordParallel","passwordLength"]}}}}}},"\/users\/scrypt-modified":{"post":{"summary":"Create User with Scrypt Modified Password","operationId":"usersCreateScryptModifiedUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createScryptModifiedUser","weight":170,"cookies":false,"type":"","demo":"users\/create-scrypt-modified-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-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 `ID.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 hashed using Scrypt Modified.","x-example":"password"},"passwordSalt":{"type":"string","description":"Salt used to hash password.","x-example":"[PASSWORD_SALT]"},"passwordSaltSeparator":{"type":"string","description":"Salt separator used to hash password.","x-example":"[PASSWORD_SALT_SEPARATOR]"},"passwordSignerKey":{"type":"string","description":"Signer key used to hash password.","x-example":"[PASSWORD_SIGNER_KEY]"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordSaltSeparator","passwordSignerKey"]}}}}}},"\/users\/sha":{"post":{"summary":"Create User with SHA Password","operationId":"usersCreateSHAUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createSHAUser","weight":167,"cookies":false,"type":"","demo":"users\/create-s-h-a-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-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 `ID.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 hashed using SHA.","x-example":"password"},"passwordVersion":{"type":"string","description":"Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'","x-example":"sha1"},"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":172,"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, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":188,"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":182,"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":"List User Logs","operationId":"usersListLogs","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":"listLogs","weight":176,"cookies":false,"type":"","demo":"users\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"List User Memberships","operationId":"usersListMemberships","tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"listMemberships","weight":175,"cookies":false,"type":"","demo":"users\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.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"}]}},"\/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":180,"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":181,"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}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":183,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.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":{"number":{"type":"string","description":"User phone number.","x-example":"+12065550100"}},"required":["number"]}}}}}},"\/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":173,"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":185,"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":"List User Sessions","operationId":"usersListSessions","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":"listSessions","weight":174,"cookies":false,"type":"","demo":"users\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":187,"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":186,"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. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":177,"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":"usersUpdateEmailVerification","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":"updateEmailVerification","weight":184,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-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"]}}}}}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":179,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-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":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","x-example":false}},"required":["phoneVerification"]}}}}}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","x-globalAttributes":[]},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.","x-globalAttributes":[]},{"name":"databases","description":"The Databases service allows you to create structured collections of documents, query and filter lists of documents","x-globalAttributes":["databaseId"]},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location.","x-globalAttributes":[]},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health.","x-globalAttributes":[]},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"project","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"storage","description":"The Storage service allows you to manage your project files.","x-globalAttributes":[]},{"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","x-globalAttributes":[]},{"name":"users","description":"The Users service allows you to manage your project users.","x-globalAttributes":[]},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions.","x-globalAttributes":[]}],"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"]},"databaseList":{"description":"Databases List","type":"object","properties":{"total":{"type":"integer","description":"Total number of databases documents that matched your query.","x-example":5,"format":"int32"},"databases":{"type":"array","description":"List of databases.","items":{"$ref":"#\/components\/schemas\/database"},"x-example":""}},"required":["total","databases"]},"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"]},"variableList":{"description":"Variables List","type":"object","properties":{"total":{"type":"integer","description":"Total number of variables documents that matched your query.","x-example":5,"format":"int32"},"variables":{"type":"array","description":"List of variables.","items":{"$ref":"#\/components\/schemas\/variable"},"x-example":""}},"required":["total","variables"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"},"$createdAt":{"type":"string","description":"Database creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Database update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","name","$createdAt","$updatedAt"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Collection creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Collection update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Collection permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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\/attributeDatetime"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$permissions","databaseId","name","enabled","documentSecurity","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\/attributeDatetime"},{"$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"]},"attributeDatetime":{"description":"AttributeDatetime","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"birthDay"},"type":{"type":"string","description":"Attribute type.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"ISO 8601 format.","x-example":"datetime"},"default":{"type":"string","description":"Default value for attribute when not provided. Only null is optional","x-example":"2020-10-15T06:38:00.000+00:00","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":[],"nullable":true}},"required":["key","type","status","attributes"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collectionId":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"string","description":"Document creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Document update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Document permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]}},"additionalProperties":true,"required":["$id","$collectionId","$databaseId","$createdAt","$updatedAt","$permissions"]},"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":"string","description":"Log creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"password":{"type":"string","description":"Hashed user password.","x-example":"$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE"},"hash":{"type":"string","description":"Password hashing algorithm.","x-example":"argon2"},"hashOptions":{"type":"object","description":"Password hashing algorithm configuration.","x-example":{},"items":{"oneOf":[{"$ref":"#\/components\/schemas\/algoArgon2"},{"$ref":"#\/components\/schemas\/algoScrypt"},{"$ref":"#\/components\/schemas\/algoScryptModified"},{"$ref":"#\/components\/schemas\/algoBcrypt"},{"$ref":"#\/components\/schemas\/algoPhpass"},{"$ref":"#\/components\/schemas\/algoSha"},{"$ref":"#\/components\/schemas\/algoMd5"}]}},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","password","hash","hashOptions","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"algoMd5":{"description":"AlgoMD5","type":"object"},"algoSha":{"description":"AlgoSHA","type":"object"},"algoPhpass":{"description":"AlgoPHPass","type":"object"},"algoBcrypt":{"description":"AlgoBcrypt","type":"object"},"algoScrypt":{"description":"AlgoScrypt","type":"object","properties":{"costCpu":{"type":"integer","description":"CPU complexity of computed hash.","x-example":8,"format":"int32"},"costMemory":{"type":"integer","description":"Memory complexity of computed hash.","x-example":14,"format":"int32"},"costParallel":{"type":"integer","description":"Parallelization of computed hash.","x-example":1,"format":"int32"},"length":{"type":"integer","description":"Length used to compute hash.","x-example":64,"format":"int32"}},"required":["costCpu","costMemory","costParallel","length"]},"algoScryptModified":{"description":"AlgoScryptModified","type":"object","properties":{"salt":{"type":"string","description":"Salt used to compute hash.","x-example":"UxLMreBr6tYyjQ=="},"saltSeparator":{"type":"string","description":"Separator used to compute hash.","x-example":"Bw=="},"signerKey":{"type":"string","description":"Key used to compute hash.","x-example":"XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ=="}},"required":["salt","saltSeparator","signerKey"]},"algoArgon2":{"description":"AlgoArgon2","type":"object","properties":{"memoryCost":{"type":"integer","description":"Memory used to compute hash.","x-example":65536,"format":"int32"},"timeCost":{"type":"integer","description":"Amount of time consumed to compute hash","x-example":4,"format":"int32"},"threads":{"type":"integer","description":"Number of threads used to compute hash.","x-example":3,"format":"int32"}},"required":["memoryCost","timeCost","threads"]},"account":{"description":"Account","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Session creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"string","description":"Session expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"The date of when the access token expires in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","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"},"$createdAt":{"type":"string","description":"Token creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"Token expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","$createdAt","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"},"$createdAt":{"type":"string","description":"File creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"File update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"File permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"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","$createdAt","$updatedAt","$permissions","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Bucket creation time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Bucket update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Bucket permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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"]},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).","x-example":"gzip"},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$createdAt","$updatedAt","$permissions","fileSecurity","name","enabled","maximumFileSize","allowedFileExtensions","compression","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Team creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Team update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Membership creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Membership update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"string","description":"Date, the user has been invited to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"joined":{"type":"string","description":"Date, the user has accepted the invitation to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Function creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Function update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"users"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"enabled":{"type":"boolean","description":"Function enabled.","x-example":false},"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":"array","description":"Function variables.","items":{"$ref":"#\/components\/schemas\/variable"},"x-example":[]},"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 * * *"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","runtime","deployment","vars","events","schedule","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"},"$createdAt":{"type":"string","description":"Deployment creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Deployment update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Execution creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Execution upate date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Execution roles.","items":{"type":"string"},"x-example":["any"]},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"duration":{"type":"number","description":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"variable":{"description":"Variable","type":"object","properties":{"$id":{"type":"string","description":"Variable ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"key":{"type":"string","description":"Variable key.","x-example":"API_KEY"},"value":{"type":"string","description":"Variable value.","x-example":"myPa$$word1"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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":{"name":{"type":"string","description":"Name of the service.","x-example":"database"},"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":["name","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 0dba02b61..4897d1657 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"version":"1.1.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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"get","weight":18,"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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"create","weight":6,"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 `ID.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"]}}]}},"\/account\/email":{"patch":{"summary":"Update 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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateEmail","weight":25,"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 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":17,"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":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","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":"listLogs","weight":21,"cookies":false,"type":"","demo":"account\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Name","operationId":"accountUpdateName","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateName","weight":23,"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 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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePassword","weight":24,"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\/phone":{"patch":{"summary":"Update Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePhone","weight":26,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.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":{"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["phone","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":19,"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 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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePrefs","weight":27,"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":32,"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":33,"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":"List Sessions","operationId":"accountListSessions","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":"listSessions","weight":20,"cookies":false,"type":"","demo":"account\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":[]}]},"delete":{"summary":"Delete 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":31,"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":16,"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\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","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":"createEmailSession","weight":7,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.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"]}}]}},"\/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. If the provided user ID has not be registered, a new user will be created. 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":12,"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 `ID.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":13,"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 OAuth2 Session","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":8,"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, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","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. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":14,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-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 `ID.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]"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"}},"required":["userId","phone"]}}]},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-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\/{sessionId}":{"get":{"summary":"Get Session","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":22,"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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":30,"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 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":29,"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\/status":{"patch":{"summary":"Update Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateStatus","weight":28,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.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\/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#accountUpdateEmailVerification). 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":34,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-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":35,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-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"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":36,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number 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":"updatePhoneVerification","weight":37,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":39,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":38,"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":42,"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. Country codes follow the [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":40,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":41,"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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":44,"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":"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.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":43,"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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all the user's documents in a given collection. You can use the query params to filter your results.","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":74,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":73,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 `ID.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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":75,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":77,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}}}}]},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":78,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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}\/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.","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":202,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, statusCode, duration","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":201,"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":"ip:{ip},userId:{userId}","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 in the background. Default value is false.","default":false,"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":203,"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":82,"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":"localeListContinents","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":"listContinents","weight":86,"cookies":false,"type":"","demo":"locale\/list-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountries","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":"listCountries","weight":83,"cookies":false,"type":"","demo":"locale\/list-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesEU","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":"listCountriesEU","weight":84,"cookies":false,"type":"","demo":"locale\/list-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesPhones","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":"listCountriesPhones","weight":85,"cookies":false,"type":"","demo":"locale\/list-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCurrencies","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":"listCurrencies","weight":87,"cookies":false,"type":"","demo":"locale\/list-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListLanguages","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":"listLanguages","weight":88,"cookies":false,"type":"","demo":"locale\/list-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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.","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":139,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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\/storage#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":138,"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":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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 `ID.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":"permissions","description":"An array of permission strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"read(\"any\")\"]","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":140,"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":144,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":{"permissions":{"type":"array","description":"An array of permission string. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","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":145,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":142,"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":141,"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":143,"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.","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":149,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":148,"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 `ID.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). Maximum of 100 roles are allowed, each 32 characters long.","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":150,"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":151,"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":152,"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":"List Team Memberships","operationId":"teamsListMemberships","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":"listMemberships","weight":154,"cookies":false,"type":"","demo":"teams\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":153,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","weight":155,"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":156,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":158,"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":157,"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.","x-globalAttributes":[]},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.","x-globalAttributes":[]},{"name":"databases","description":"The Databases service allows you to create structured collections of documents, query and filter lists of documents","x-globalAttributes":["databaseId"]},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location.","x-globalAttributes":[]},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health.","x-globalAttributes":[]},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"storage","description":"The Storage service allows you to manage your project files.","x-globalAttributes":[]},{"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","x-globalAttributes":[]},{"name":"users","description":"The Users service allows you to manage your project users.","x-globalAttributes":[]},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions.","x-globalAttributes":[]}],"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"},"$collectionId":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"string","description":"Document creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Document update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Document permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]}},"additionalProperties":true,"required":["$id","$collectionId","$databaseId","$createdAt","$updatedAt","$permissions"]},"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":"string","description":"Log creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"]},"account":{"description":"Account","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Session creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"string","description":"Session expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"The date of when the access token expires in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","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"},"$createdAt":{"type":"string","description":"Token creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"Token expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","$createdAt","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"},"$createdAt":{"type":"string","description":"File creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"File update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"File permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"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","$createdAt","$updatedAt","$permissions","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Team creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Team update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Membership creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Membership update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"string","description":"Date, the user has been invited to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"joined":{"type":"string","description":"Date, the user has accepted the invitation to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Execution creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Execution upate date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Execution roles.","items":{"type":"string"},"x-example":["any"]},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"duration":{"type":"number","description":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"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":"1.1.2","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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"get","weight":19,"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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"create","weight":7,"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 `ID.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"]}}]}},"\/account\/email":{"patch":{"summary":"Update 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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateEmail","weight":26,"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 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":18,"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":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","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":"listLogs","weight":22,"cookies":false,"type":"","demo":"account\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Name","operationId":"accountUpdateName","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateName","weight":24,"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 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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePassword","weight":25,"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\/phone":{"patch":{"summary":"Update Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.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":{"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["phone","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":20,"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 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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePrefs","weight":28,"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":33,"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":34,"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":"List Sessions","operationId":"accountListSessions","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":"listSessions","weight":21,"cookies":false,"type":"","demo":"account\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":[]}]},"delete":{"summary":"Delete 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":32,"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":17,"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\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","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":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.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"]}}]}},"\/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. If the provided user ID has not be registered, a new user will be created. 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":13,"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 `ID.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":14,"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 OAuth2 Session","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":9,"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, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","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. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-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 `ID.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]"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"}},"required":["userId","phone"]}}]},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":16,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-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\/{sessionId}":{"get":{"summary":"Get Session","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":23,"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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":31,"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 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":30,"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\/status":{"patch":{"summary":"Update Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateStatus","weight":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.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\/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#accountUpdateEmailVerification). 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":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-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":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-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"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number 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":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":40,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":39,"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":43,"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. Country codes follow the [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":41,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":42,"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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":45,"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":"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.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":44,"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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all the user's documents in a given collection. You can use the query params to filter your results.","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":75,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":74,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 `ID.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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":76,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":78,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}}}}]},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":79,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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}\/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.","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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, statusCode, duration","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":"ip:{ip},userId:{userId}","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 in the background. Default value is false.","default":false,"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":83,"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":"localeListContinents","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":"listContinents","weight":87,"cookies":false,"type":"","demo":"locale\/list-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountries","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":"listCountries","weight":84,"cookies":false,"type":"","demo":"locale\/list-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesEU","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":"listCountriesEU","weight":85,"cookies":false,"type":"","demo":"locale\/list-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesPhones","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":"listCountriesPhones","weight":86,"cookies":false,"type":"","demo":"locale\/list-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCurrencies","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":"listCurrencies","weight":88,"cookies":false,"type":"","demo":"locale\/list-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListLanguages","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":"listLanguages","weight":89,"cookies":false,"type":"","demo":"locale\/list-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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.","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":142,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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\/storage#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":141,"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":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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 `ID.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":"permissions","description":"An array of permission strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"read(\"any\")\"]","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":143,"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":147,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":{"permissions":{"type":"array","description":"An array of permission string. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","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":148,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":145,"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":144,"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":146,"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.","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":152,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":151,"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 `ID.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). Maximum of 100 roles are allowed, each 32 characters long.","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":153,"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":154,"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":155,"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":"List Team Memberships","operationId":"teamsListMemberships","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":"listMemberships","weight":157,"cookies":false,"type":"","demo":"teams\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":156,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","weight":158,"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":159,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":161,"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":160,"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.","x-globalAttributes":[]},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.","x-globalAttributes":[]},{"name":"databases","description":"The Databases service allows you to create structured collections of documents, query and filter lists of documents","x-globalAttributes":["databaseId"]},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location.","x-globalAttributes":[]},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health.","x-globalAttributes":[]},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"project","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"storage","description":"The Storage service allows you to manage your project files.","x-globalAttributes":[]},{"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","x-globalAttributes":[]},{"name":"users","description":"The Users service allows you to manage your project users.","x-globalAttributes":[]},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions.","x-globalAttributes":[]}],"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"},"$collectionId":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"string","description":"Document creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Document update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Document permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]}},"additionalProperties":true,"required":["$id","$collectionId","$databaseId","$createdAt","$updatedAt","$permissions"]},"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":"string","description":"Log creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"]},"account":{"description":"Account","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Session creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"string","description":"Session expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"The date of when the access token expires in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","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"},"$createdAt":{"type":"string","description":"Token creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"Token expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","$createdAt","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"},"$createdAt":{"type":"string","description":"File creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"File update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"File permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"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","$createdAt","$updatedAt","$permissions","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Team creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Team update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Membership creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Membership update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"string","description":"Date, the user has been invited to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"joined":{"type":"string","description":"Date, the user has accepted the invitation to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Execution creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Execution upate date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Execution roles.","items":{"type":"string"},"x-example":["any"]},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"duration":{"type":"number","description":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"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 80adb7104..119082542 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"version":"1.1.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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"get","weight":18,"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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"create","weight":6,"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 `ID.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"]}}]}},"\/account\/email":{"patch":{"summary":"Update 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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateEmail","weight":25,"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 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":17,"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":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","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":"listLogs","weight":21,"cookies":false,"type":"","demo":"account\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Name","operationId":"accountUpdateName","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateName","weight":23,"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 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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePassword","weight":24,"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\/phone":{"patch":{"summary":"Update Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePhone","weight":26,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.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":{"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["phone","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":19,"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 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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePrefs","weight":27,"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":32,"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":33,"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":"List Sessions","operationId":"accountListSessions","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":"listSessions","weight":20,"cookies":false,"type":"","demo":"account\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":[]}]},"delete":{"summary":"Delete 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":31,"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":16,"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\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","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":"createEmailSession","weight":7,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.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"]}}]}},"\/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. If the provided user ID has not be registered, a new user will be created. 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":12,"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 `ID.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":13,"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 OAuth2 Session","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":8,"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, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","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. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":14,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-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 `ID.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]"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"}},"required":["userId","phone"]}}]},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-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\/{sessionId}":{"get":{"summary":"Get Session","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":22,"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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":30,"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 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":29,"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\/status":{"patch":{"summary":"Update Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateStatus","weight":28,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.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\/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#accountUpdateEmailVerification). 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":34,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-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":35,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-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"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":36,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number 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":"updatePhoneVerification","weight":37,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":39,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":38,"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":42,"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. Country codes follow the [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":40,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":41,"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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":44,"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":"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.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":43,"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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.","responses":{"200":{"description":"Databases List","schema":{"$ref":"#\/definitions\/databaseList"}}},"x-appwrite":{"method":"list","weight":46,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Database.\n","responses":{"201":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"create","weight":45,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"databaseId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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":"[DATABASE_ID]","x-global":true},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["databaseId","name"]}}]}},"\/databases\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","schema":{"$ref":"#\/definitions\/usageDatabases"}}},"x-appwrite":{"method":"getUsage","weight":79,"cookies":false,"type":"","demo":"databases\/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"}]}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.","responses":{"200":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"get","weight":47,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Update a database by its unique ID.","responses":{"200":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"update","weight":49,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_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]"}},"required":["name"]}}]},"delete":{"summary":"Delete Database","operationId":"databasesDelete","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":50,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"listCollections","weight":52,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":51,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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]"},"permissions":{"type":"array","description":"An array of permissions strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false}},"required":["collectionId","name"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":53,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"updateCollection","weight":55,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permission are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","default":true,"x-example":false}},"required":["name"]}}]},"delete":{"summary":"Delete Collection","operationId":"databasesDeleteCollection","consumes":["application\/json"],"produces":[],"tags":["databases"],"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":56,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":66,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a boolean attribute.\n","responses":{"202":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"createBooleanAttribute","weight":64,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":65,"cookies":false,"type":"","demo":"databases\/create-datetime-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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 the attribute in ISO 8601 format. Cannot be set when attribute is required.","default":null,"x-example":"2020-10-15T06:38:00.000+00:00"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create an email attribute.\n","responses":{"202":{"description":"AttributeEmail","schema":{"$ref":"#\/definitions\/attributeEmail"}}},"x-appwrite":{"method":"createEmailAttribute","weight":58,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":59,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 elements are allowed, each 4096 characters long.","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeFloat","schema":{"$ref":"#\/definitions\/attributeFloat"}}},"x-appwrite":{"method":"createFloatAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeInteger","schema":{"$ref":"#\/definitions\/attributeInteger"}}},"x-appwrite":{"method":"createIntegerAttribute","weight":62,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create IP address attribute.\n","responses":{"202":{"description":"AttributeIP","schema":{"$ref":"#\/definitions\/attributeIp"}}},"x-appwrite":{"method":"createIpAttribute","weight":60,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a string attribute.\n","responses":{"202":{"description":"AttributeString","schema":{"$ref":"#\/definitions\/attributeString"}}},"x-appwrite":{"method":"createStringAttribute","weight":57,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a URL attribute.\n","responses":{"202":{"description":"AttributeURL","schema":{"$ref":"#\/definitions\/attributeUrl"}}},"x-appwrite":{"method":"createUrlAttribute","weight":61,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime, or AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeString","schema":{"x-oneOf":[{"$ref":"#\/definitions\/attributeDatetime"},{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeDatetime"},{"$ref":"#\/definitions\/attributeString"}]}}},"x-appwrite":{"method":"getAttribute","weight":67,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteAttribute","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":68,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Attribute Key.","required":true,"type":"string","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all the user's documents in a given collection. You can use the query params to filter your results.","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":74,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":73,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 `ID.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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":75,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":77,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}}}}]},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":78,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databasesListDocumentLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":76,"cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":70,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":69,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 attributes are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":71,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteIndex","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":72,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Index Key.","required":true,"type":"string","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListCollectionLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":54,"cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","schema":{"$ref":"#\/definitions\/usageCollection"}}},"x-appwrite":{"method":"getCollectionUsage","weight":81,"cookies":false,"type":"","demo":"databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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"}]}},"\/databases\/{databaseId}\/logs":{"get":{"summary":"List Database Logs","operationId":"databasesListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get the database activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":48,"cookies":false,"type":"","demo":"databases\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","schema":{"$ref":"#\/definitions\/usageDatabase"}}},"x-appwrite":{"method":"getDatabaseUsage","weight":80,"cookies":false,"type":"","demo":"databases\/get-database-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"range","description":"`Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/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":188,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":187,"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 `ID.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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","default":null,"x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","default":null,"x-example":"node-14.5"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","default":true,"x-example":false}},"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":189,"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\/usage":{"get":{"summary":"Get Functions 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":192,"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":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/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":190,"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":193,"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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","default":null,"x-example":"[\"any\"]","items":{"type":"string"}},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","default":true,"x-example":false}},"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":195,"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":197,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: entrypoint, size, buildId, activate","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":{"202":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":196,"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":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"getDeployment","weight":198,"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":194,"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":199,"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":"Create Build","operationId":"functionsCreateBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":200,"cookies":false,"type":"","demo":"functions\/create-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.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"},{"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.","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":202,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, statusCode, duration","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":201,"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":"ip:{ip},userId:{userId}","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 in the background. Default value is false.","default":false,"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":203,"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":"functionsGetFunctionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","schema":{"$ref":"#\/definitions\/usageFunctions"}}},"x-appwrite":{"method":"getFunctionUsage","weight":191,"cookies":false,"type":"","demo":"functions\/get-function-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"}]}},"\/functions\/{functionId}\/variables":{"get":{"summary":"List Variables","operationId":"functionsListVariables","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all variables of a specific function.","responses":{"200":{"description":"Variables List","schema":{"$ref":"#\/definitions\/variableList"}}},"x-appwrite":{"method":"listVariables","weight":205,"cookies":false,"type":"","demo":"functions\/list-variables.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-variables.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]},"post":{"summary":"Create Variable","operationId":"functionsCreateVariable","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Create a new function variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"createVariable","weight":204,"cookies":false,"type":"","demo":"functions\/create-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","default":null,"x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","default":null,"x-example":"[VALUE]"}},"required":["key","value"]}}]}},"\/functions\/{functionId}\/variables\/{variableId}":{"get":{"summary":"Get Variable","operationId":"functionsGetVariable","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a variable by its unique ID.","responses":{"200":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"getVariable","weight":206,"cookies":false,"type":"","demo":"functions\/get-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"type":"string","x-example":"[VARIABLE_ID]","in":"path"}]},"put":{"summary":"Update Variable","operationId":"functionsUpdateVariable","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update variable by its unique ID.","responses":{"200":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"updateVariable","weight":207,"cookies":false,"type":"","demo":"functions\/update-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"type":"string","x-example":"[VARIABLE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","default":null,"x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","default":null,"x-example":"[VALUE]"}},"required":["key"]}}]},"delete":{"summary":"Delete Variable","operationId":"functionsDeleteVariable","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a variable by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteVariable","weight":208,"cookies":false,"type":"","demo":"functions\/delete-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"type":"string","x-example":"[VARIABLE_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":89,"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":99,"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":92,"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":91,"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":96,"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":97,"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":95,"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\/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":94,"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":98,"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":93,"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":82,"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":"localeListContinents","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":"listContinents","weight":86,"cookies":false,"type":"","demo":"locale\/list-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountries","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":"listCountries","weight":83,"cookies":false,"type":"","demo":"locale\/list-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesEU","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":"listCountriesEU","weight":84,"cookies":false,"type":"","demo":"locale\/list-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesPhones","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":"listCountriesPhones","weight":85,"cookies":false,"type":"","demo":"locale\/list-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCurrencies","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":"listCurrencies","weight":87,"cookies":false,"type":"","demo":"locale\/list-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListLanguages","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":"listLanguages","weight":88,"cookies":false,"type":"","demo":"locale\/list-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":102,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":101,"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 `ID.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]"},"region":{"type":"string","description":"Project Region.","default":null,"x-example":"default"},"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","region"]}}]}},"\/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":103,"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":105,"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":111,"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\/duration":{"patch":{"summary":"Update Project Authentication Duration","operationId":"projectsUpdateAuthDuration","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthDuration","weight":109,"cookies":false,"type":"","demo":"projects\/update-auth-duration.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":{"duration":{"type":"integer","description":"Project session length in seconds. Max length: 31536000 seconds.","default":null,"x-example":0}},"required":["duration"]}}]}},"\/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":108,"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":110,"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":129,"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":128,"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":130,"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":132,"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":131,"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":119,"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":118,"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. Maximum of 100 scopes are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","default":null,"x-example":"2020-10-15T06:38:00.000+00:00"}},"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":120,"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":121,"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. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","default":null,"x-example":"2020-10-15T06:38:00.000+00:00"}},"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":122,"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":107,"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":null,"x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","default":null,"x-example":"[SECRET]"},"enabled":{"type":"boolean","description":"Provider status. Set to 'false' to disable new session creation.","default":null,"x-example":false}},"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":124,"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":123,"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":null}},"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":125,"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":126,"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":null}},"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":127,"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":106,"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":104,"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":113,"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":112,"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. Maximum of 100 events are allowed.","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":114,"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":115,"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. Maximum of 100 events are allowed.","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":117,"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"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhookSignature","weight":116,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.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":134,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":133,"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 `ID.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]"},"permissions":{"type":"array","description":"An array of permission strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","default":"none","x-example":"none"},"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"]}}]}},"\/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":135,"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":136,"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","default":"none","x-example":"none"},"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"]}}]},"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":137,"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.","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":139,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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\/storage#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":138,"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":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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 `ID.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":"permissions","description":"An array of permission strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"read(\"any\")\"]","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":140,"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":144,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":{"permissions":{"type":"array","description":"An array of permission string. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","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":145,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":142,"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":141,"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":143,"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":146,"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":147,"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.","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":149,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":148,"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 `ID.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). Maximum of 100 roles are allowed, each 32 characters long.","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":150,"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":151,"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":152,"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}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":159,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"List Team Memberships","operationId":"teamsListMemberships","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":"listMemberships","weight":154,"cookies":false,"type":"","demo":"teams\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":153,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","weight":155,"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":156,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":158,"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":157,"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":168,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":160,"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 `ID.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"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"},"password":{"type":"string","description":"Plain text 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"]}}]}},"\/users\/argon2":{"post":{"summary":"Create User with Argon2 Password","operationId":"usersCreateArgon2User","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createArgon2User","weight":163,"cookies":false,"type":"","demo":"users\/create-argon2user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-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 `ID.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 hashed using Argon2.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/bcrypt":{"post":{"summary":"Create User with Bcrypt Password","operationId":"usersCreateBcryptUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createBcryptUser","weight":161,"cookies":false,"type":"","demo":"users\/create-bcrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-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 `ID.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 hashed using Bcrypt.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/md5":{"post":{"summary":"Create User with MD5 Password","operationId":"usersCreateMD5User","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createMD5User","weight":162,"cookies":false,"type":"","demo":"users\/create-m-d5user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-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 `ID.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 hashed using MD5.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/phpass":{"post":{"summary":"Create User with PHPass Password","operationId":"usersCreatePHPassUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createPHPassUser","weight":165,"cookies":false,"type":"","demo":"users\/create-p-h-pass-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-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 `ID.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 hashed using PHPass.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/scrypt":{"post":{"summary":"Create User with Scrypt Password","operationId":"usersCreateScryptUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createScryptUser","weight":166,"cookies":false,"type":"","demo":"users\/create-scrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-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 `ID.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 hashed using Scrypt.","default":null,"x-example":"password"},"passwordSalt":{"type":"string","description":"Optional salt used to hash password.","default":null,"x-example":"[PASSWORD_SALT]"},"passwordCpu":{"type":"integer","description":"Optional CPU cost used to hash password.","default":null,"x-example":null},"passwordMemory":{"type":"integer","description":"Optional memory cost used to hash password.","default":null,"x-example":null},"passwordParallel":{"type":"integer","description":"Optional parallelization cost used to hash password.","default":null,"x-example":null},"passwordLength":{"type":"integer","description":"Optional hash length used to hash password.","default":null,"x-example":null},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordCpu","passwordMemory","passwordParallel","passwordLength"]}}]}},"\/users\/scrypt-modified":{"post":{"summary":"Create User with Scrypt Modified Password","operationId":"usersCreateScryptModifiedUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createScryptModifiedUser","weight":167,"cookies":false,"type":"","demo":"users\/create-scrypt-modified-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-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 `ID.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 hashed using Scrypt Modified.","default":null,"x-example":"password"},"passwordSalt":{"type":"string","description":"Salt used to hash password.","default":null,"x-example":"[PASSWORD_SALT]"},"passwordSaltSeparator":{"type":"string","description":"Salt separator used to hash password.","default":null,"x-example":"[PASSWORD_SALT_SEPARATOR]"},"passwordSignerKey":{"type":"string","description":"Signer key used to hash password.","default":null,"x-example":"[PASSWORD_SIGNER_KEY]"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordSaltSeparator","passwordSignerKey"]}}]}},"\/users\/sha":{"post":{"summary":"Create User with SHA Password","operationId":"usersCreateSHAUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createSHAUser","weight":164,"cookies":false,"type":"","demo":"users\/create-s-h-a-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-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 `ID.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 hashed using SHA.","default":null,"x-example":"password"},"passwordVersion":{"type":"string","description":"Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'","default":"","x-example":"sha1"},"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":186,"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":169,"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, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":185,"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":179,"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":"List User Logs","operationId":"usersListLogs","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":"listLogs","weight":173,"cookies":false,"type":"","demo":"users\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"List User Memberships","operationId":"usersListMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"listMemberships","weight":172,"cookies":false,"type":"","demo":"users\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.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"}]}},"\/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":177,"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":178,"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}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":180,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.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":{"number":{"type":"string","description":"User phone number.","default":null,"x-example":"+12065550100"}},"required":["number"]}}]}},"\/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":170,"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":182,"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":"List User Sessions","operationId":"usersListSessions","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":"listSessions","weight":171,"cookies":false,"type":"","demo":"users\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":184,"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":183,"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. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":174,"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":"usersUpdateEmailVerification","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":"updateEmailVerification","weight":181,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-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"]}}]}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":176,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-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":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","x-globalAttributes":[]},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.","x-globalAttributes":[]},{"name":"databases","description":"The Databases service allows you to create structured collections of documents, query and filter lists of documents","x-globalAttributes":["databaseId"]},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location.","x-globalAttributes":[]},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health.","x-globalAttributes":[]},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"storage","description":"The Storage service allows you to manage your project files.","x-globalAttributes":[]},{"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","x-globalAttributes":[]},{"name":"users","description":"The Users service allows you to manage your project users.","x-globalAttributes":[]},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions.","x-globalAttributes":[]}],"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"]},"databaseList":{"description":"Databases List","type":"object","properties":{"total":{"type":"integer","description":"Total number of databases documents that matched your query.","x-example":5,"format":"int32"},"databases":{"type":"array","description":"List of databases.","items":{"type":"object","$ref":"#\/definitions\/database"},"x-example":""}},"required":["total","databases"]},"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"]},"variableList":{"description":"Variables List","type":"object","properties":{"total":{"type":"integer","description":"Total number of variables documents that matched your query.","x-example":5,"format":"int32"},"variables":{"type":"array","description":"List of variables.","items":{"type":"object","$ref":"#\/definitions\/variable"},"x-example":""}},"required":["total","variables"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"},"$createdAt":{"type":"string","description":"Database creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Database update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","name","$createdAt","$updatedAt"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Collection creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Collection update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Collection permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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\/attributeDatetime"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$permissions","databaseId","name","enabled","documentSecurity","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\/attributeDatetime"},{"$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"]},"attributeDatetime":{"description":"AttributeDatetime","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"birthDay"},"type":{"type":"string","description":"Attribute type.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"ISO 8601 format.","x-example":"datetime"},"default":{"type":"string","description":"Default value for attribute when not provided. Only null is optional","x-example":"2020-10-15T06:38:00.000+00:00","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":[],"x-nullable":true}},"required":["key","type","status","attributes"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collectionId":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"string","description":"Document creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Document update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Document permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]}},"additionalProperties":true,"required":["$id","$collectionId","$databaseId","$createdAt","$updatedAt","$permissions"]},"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":"string","description":"Log creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"password":{"type":"string","description":"Hashed user password.","x-example":"$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE"},"hash":{"type":"string","description":"Password hashing algorithm.","x-example":"argon2"},"hashOptions":{"type":"object","description":"Password hashing algorithm configuration.","x-example":{},"items":{"x-oneOf":[{"$ref":"#\/definitions\/algoArgon2"},{"$ref":"#\/definitions\/algoScrypt"},{"$ref":"#\/definitions\/algoScryptModified"},{"$ref":"#\/definitions\/algoBcrypt"},{"$ref":"#\/definitions\/algoPhpass"},{"$ref":"#\/definitions\/algoSha"},{"$ref":"#\/definitions\/algoMd5"}]}},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","password","hash","hashOptions","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"algoMd5":{"description":"AlgoMD5","type":"object"},"algoSha":{"description":"AlgoSHA","type":"object"},"algoPhpass":{"description":"AlgoPHPass","type":"object"},"algoBcrypt":{"description":"AlgoBcrypt","type":"object"},"algoScrypt":{"description":"AlgoScrypt","type":"object","properties":{"costCpu":{"type":"integer","description":"CPU complexity of computed hash.","x-example":8,"format":"int32"},"costMemory":{"type":"integer","description":"Memory complexity of computed hash.","x-example":14,"format":"int32"},"costParallel":{"type":"integer","description":"Parallelization of computed hash.","x-example":1,"format":"int32"},"length":{"type":"integer","description":"Length used to compute hash.","x-example":64,"format":"int32"}},"required":["costCpu","costMemory","costParallel","length"]},"algoScryptModified":{"description":"AlgoScryptModified","type":"object","properties":{"salt":{"type":"string","description":"Salt used to compute hash.","x-example":"UxLMreBr6tYyjQ=="},"saltSeparator":{"type":"string","description":"Separator used to compute hash.","x-example":"Bw=="},"signerKey":{"type":"string","description":"Key used to compute hash.","x-example":"XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ=="}},"required":["salt","saltSeparator","signerKey"]},"algoArgon2":{"description":"AlgoArgon2","type":"object","properties":{"memoryCost":{"type":"integer","description":"Memory used to compute hash.","x-example":65536,"format":"int32"},"timeCost":{"type":"integer","description":"Amount of time consumed to compute hash","x-example":4,"format":"int32"},"threads":{"type":"integer","description":"Number of threads used to compute hash.","x-example":3,"format":"int32"}},"required":["memoryCost","timeCost","threads"]},"account":{"description":"Account","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Session creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"string","description":"Session expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"The date of when the access token expires in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","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"},"$createdAt":{"type":"string","description":"Token creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"Token expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","$createdAt","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"},"$createdAt":{"type":"string","description":"File creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"File update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"File permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"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","$createdAt","$updatedAt","$permissions","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Bucket creation time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Bucket update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Bucket permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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"]},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).","x-example":"gzip"},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$createdAt","$updatedAt","$permissions","fileSecurity","name","enabled","maximumFileSize","allowedFileExtensions","compression","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Team creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Team update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Membership creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Membership update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"string","description":"Date, the user has been invited to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"joined":{"type":"string","description":"Date, the user has accepted the invitation to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Function creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Function update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"users"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"enabled":{"type":"boolean","description":"Function enabled.","x-example":false},"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":"array","description":"Function variables.","items":{"type":"object","$ref":"#\/definitions\/variable"},"x-example":[]},"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":"string","description":"Function's next scheduled execution time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"schedulePrevious":{"type":"string","description":"Function's previous scheduled execution time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","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"},"$createdAt":{"type":"string","description":"Deployment creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Deployment update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Execution creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Execution upate date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Execution roles.","items":{"type":"string"},"x-example":["any"]},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"duration":{"type":"number","description":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Project creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Project update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"authDuration":{"type":"integer","description":"Session duration in seconds.","x-example":60,"format":"int32"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"providers":{"type":"array","description":"List of Providers.","items":{"type":"object","$ref":"#\/definitions\/provider"},"x-example":{}},"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":{}},"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},"serviceStatusForDatabases":{"type":"boolean","description":"Databases 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","$createdAt","$updatedAt","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authDuration","authLimit","providers","platforms","webhooks","keys","domains","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Webhook creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Webhook update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"signatureKey":{"type":"string","description":"Signature key which can be used to validated incoming","x-example":"ad3d581ca230e2b7059c545e5a"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Key creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Key update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"expire":{"type":"string","description":"Key expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"},"accessedAt":{"type":"string","description":"Most recent access date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"sdks":{"type":"array","description":"List of SDK user agents that used this key.","items":{"type":"string"},"x-example":"appwrite:flutter"}},"required":["$id","$createdAt","$updatedAt","name","expire","scopes","secret","accessedAt","sdks"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Domain creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Domain update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"provider":{"description":"Provider","type":"object","properties":{"name":{"type":"string","description":"Provider name.","x-example":"GitHub"},"appId":{"type":"string","description":"OAuth 2.0 application ID.","x-example":"259125845563242502"},"secret":{"type":"string","description":"OAuth 2.0 application secret. Might be JSON string if provider requires extra configuration.","x-example":"Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ"},"enabled":{"type":"boolean","description":"Provider is active and can be used to create session.","x-example":""}},"required":["name","appId","secret","enabled"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Platform creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Platform update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","name","type","key","store","hostname","httpUser","httpPass"]},"variable":{"description":"Variable","type":"object","properties":{"$id":{"type":"string","description":"Variable ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"key":{"type":"string","description":"Variable key.","x-example":"API_KEY"},"value":{"type":"string","description":"Variable value.","x-example":"myPa$$word1"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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"]},"metric":{"description":"Metric","type":"object","properties":{"value":{"type":"integer","description":"The value of this metric at the timestamp.","x-example":1,"format":"int32"},"date":{"type":"string","description":"The date at which this metric was aggregated in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["value","date"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databasesCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databasesRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databasesUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databasesDelete":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","databasesCount","documentsCount","collectionsCount","databasesCreate","databasesRead","databasesUpdate","databasesDelete","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"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\/metric"},"x-example":[]},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"type":"object","$ref":"#\/definitions\/metric"},"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\/metric"},"x-example":[]},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"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\/metric"},"x-example":[]},"usersCreate":{"type":"array","description":"Aggregated stats for users created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"usersRead":{"type":"array","description":"Aggregated stats for users read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"usersUpdate":{"type":"array","description":"Aggregated stats for users updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"usersDelete":{"type":"array","description":"Aggregated stats for users deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"sessionsCreate":{"type":"array","description":"Aggregated stats for sessions created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"sessionsProviderCreate":{"type":"array","description":"Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"sessionsDelete":{"type":"array","description":"Aggregated stats for sessions deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"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"},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesCount":{"type":"array","description":"Aggregated stats for total number of files.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsCount":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsCreate":{"type":"array","description":"Aggregated stats for buckets created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsRead":{"type":"array","description":"Aggregated stats for buckets read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsUpdate":{"type":"array","description":"Aggregated stats for buckets updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsDelete":{"type":"array","description":"Aggregated stats for buckets deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","storage","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\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"type":"object","$ref":"#\/definitions\/metric"},"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"},"executionsTotal":{"type":"array","description":"Aggregated stats for number of function executions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsFailure":{"type":"array","description":"Aggregated stats for function execution failures.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsSuccess":{"type":"array","description":"Aggregated stats for function execution successes.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsTime":{"type":"array","description":"Aggregated stats for function execution duration.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsTotal":{"type":"array","description":"Aggregated stats for number of function builds.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsFailure":{"type":"array","description":"Aggregated stats for function build failures.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsSuccess":{"type":"array","description":"Aggregated stats for function build successes.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsTime":{"type":"array","description":"Aggregated stats for function build duration.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","executionsTotal","executionsFailure","executionsSuccess","executionsTime","buildsTotal","buildsFailure","buildsSuccess","buildsTime"]},"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\/metric"},"x-example":[]},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executions":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documents":{"type":"array","description":"Aggregated stats for number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databases":{"type":"array","description":"Aggregated stats for number of databases.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"users":{"type":"array","description":"Aggregated stats for number of users.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buckets":{"type":"array","description":"Aggregated stats for number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","requests","network","executions","documents","databases","users","storage","buckets"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} +{"swagger":"2.0","info":{"version":"1.1.2","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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"get","weight":19,"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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"create","weight":7,"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 `ID.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"]}}]}},"\/account\/email":{"patch":{"summary":"Update 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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateEmail","weight":26,"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\/invite":{"post":{"summary":"Create account using an invite code","operationId":"accountCreateWithInviteCode","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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"createWithInviteCode","weight":6,"cookies":false,"type":"","demo":"account\/create-with-invite-code.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":["console"],"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 `ID.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]"},"code":{"type":"string","description":"An invite code to restrict user signups on the Appwrite console. Users with an invite code will be able to create accounts irrespective of email and IP whitelists.","default":"","x-example":"[CODE]"}},"required":["userId","email","password"]}}]}},"\/account\/jwt":{"post":{"summary":"Create 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":18,"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":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","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":"listLogs","weight":22,"cookies":false,"type":"","demo":"account\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Name","operationId":"accountUpdateName","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateName","weight":24,"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 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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePassword","weight":25,"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\/phone":{"patch":{"summary":"Update Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.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":{"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["phone","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":20,"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 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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePrefs","weight":28,"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":33,"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":34,"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":"List Sessions","operationId":"accountListSessions","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":"listSessions","weight":21,"cookies":false,"type":"","demo":"account\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":[]}]},"delete":{"summary":"Delete 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":32,"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":17,"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\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","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":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.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"]}}]}},"\/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. If the provided user ID has not be registered, a new user will be created. 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":13,"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 `ID.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":14,"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 OAuth2 Session","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":9,"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, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","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. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-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 `ID.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]"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"}},"required":["userId","phone"]}}]},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":16,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-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\/{sessionId}":{"get":{"summary":"Get Session","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":23,"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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":31,"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 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":30,"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\/status":{"patch":{"summary":"Update Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateStatus","weight":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.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\/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#accountUpdateEmailVerification). 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":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-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":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-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"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number 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":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":40,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":39,"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":43,"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. Country codes follow the [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":41,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":42,"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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":45,"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":"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.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":44,"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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.","responses":{"200":{"description":"Databases List","schema":{"$ref":"#\/definitions\/databaseList"}}},"x-appwrite":{"method":"list","weight":47,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Database.\n","responses":{"201":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"create","weight":46,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"databaseId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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":"[DATABASE_ID]","x-global":true},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["databaseId","name"]}}]}},"\/databases\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","schema":{"$ref":"#\/definitions\/usageDatabases"}}},"x-appwrite":{"method":"getUsage","weight":80,"cookies":false,"type":"","demo":"databases\/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"}]}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.","responses":{"200":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"get","weight":48,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Update a database by its unique ID.","responses":{"200":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"update","weight":50,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_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]"}},"required":["name"]}}]},"delete":{"summary":"Delete Database","operationId":"databasesDelete","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":51,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"listCollections","weight":53,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":52,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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]"},"permissions":{"type":"array","description":"An array of permissions strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false}},"required":["collectionId","name"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":54,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"updateCollection","weight":56,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permission are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","default":true,"x-example":false}},"required":["name"]}}]},"delete":{"summary":"Delete Collection","operationId":"databasesDeleteCollection","consumes":["application\/json"],"produces":[],"tags":["databases"],"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":57,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":67,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a boolean attribute.\n","responses":{"202":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"createBooleanAttribute","weight":65,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":66,"cookies":false,"type":"","demo":"databases\/create-datetime-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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 the attribute in ISO 8601 format. Cannot be set when attribute is required.","default":null,"x-example":"2020-10-15T06:38:00.000+00:00"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create an email attribute.\n","responses":{"202":{"description":"AttributeEmail","schema":{"$ref":"#\/definitions\/attributeEmail"}}},"x-appwrite":{"method":"createEmailAttribute","weight":59,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":60,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 elements are allowed, each 4096 characters long.","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeFloat","schema":{"$ref":"#\/definitions\/attributeFloat"}}},"x-appwrite":{"method":"createFloatAttribute","weight":64,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeInteger","schema":{"$ref":"#\/definitions\/attributeInteger"}}},"x-appwrite":{"method":"createIntegerAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create IP address attribute.\n","responses":{"202":{"description":"AttributeIP","schema":{"$ref":"#\/definitions\/attributeIp"}}},"x-appwrite":{"method":"createIpAttribute","weight":61,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a string attribute.\n","responses":{"202":{"description":"AttributeString","schema":{"$ref":"#\/definitions\/attributeString"}}},"x-appwrite":{"method":"createStringAttribute","weight":58,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a URL attribute.\n","responses":{"202":{"description":"AttributeURL","schema":{"$ref":"#\/definitions\/attributeUrl"}}},"x-appwrite":{"method":"createUrlAttribute","weight":62,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime, or AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeString","schema":{"x-oneOf":[{"$ref":"#\/definitions\/attributeDatetime"},{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeDatetime"},{"$ref":"#\/definitions\/attributeString"}]}}},"x-appwrite":{"method":"getAttribute","weight":68,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteAttribute","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":69,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Attribute Key.","required":true,"type":"string","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all the user's documents in a given collection. You can use the query params to filter your results.","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":75,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":74,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 `ID.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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":76,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":78,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}}}}]},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":79,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databasesListDocumentLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":77,"cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":71,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":70,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 attributes are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":72,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteIndex","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":73,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Index Key.","required":true,"type":"string","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListCollectionLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":55,"cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","schema":{"$ref":"#\/definitions\/usageCollection"}}},"x-appwrite":{"method":"getCollectionUsage","weight":82,"cookies":false,"type":"","demo":"databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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"}]}},"\/databases\/{databaseId}\/logs":{"get":{"summary":"List Database Logs","operationId":"databasesListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get the database activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":49,"cookies":false,"type":"","demo":"databases\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","schema":{"$ref":"#\/definitions\/usageDatabase"}}},"x-appwrite":{"method":"getDatabaseUsage","weight":81,"cookies":false,"type":"","demo":"databases\/get-database-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"range","description":"`Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/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":191,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":190,"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 `ID.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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","default":null,"x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","default":null,"x-example":"node-14.5"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","default":true,"x-example":false}},"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":192,"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\/usage":{"get":{"summary":"Get Functions 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":195,"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":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/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":193,"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":196,"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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","default":null,"x-example":"[\"any\"]","items":{"type":"string"}},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","default":true,"x-example":false}},"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":198,"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":200,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: entrypoint, size, buildId, activate","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":{"202":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":199,"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":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"getDeployment","weight":201,"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":197,"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":202,"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":"Create Build","operationId":"functionsCreateBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":203,"cookies":false,"type":"","demo":"functions\/create-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.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"},{"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.","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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, statusCode, duration","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":"ip:{ip},userId:{userId}","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 in the background. Default value is false.","default":false,"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":"functionsGetFunctionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","schema":{"$ref":"#\/definitions\/usageFunctions"}}},"x-appwrite":{"method":"getFunctionUsage","weight":194,"cookies":false,"type":"","demo":"functions\/get-function-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"}]}},"\/functions\/{functionId}\/variables":{"get":{"summary":"List Variables","operationId":"functionsListVariables","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all variables of a specific function.","responses":{"200":{"description":"Variables List","schema":{"$ref":"#\/definitions\/variableList"}}},"x-appwrite":{"method":"listVariables","weight":208,"cookies":false,"type":"","demo":"functions\/list-variables.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-variables.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]},"post":{"summary":"Create Variable","operationId":"functionsCreateVariable","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Create a new function variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"createVariable","weight":207,"cookies":false,"type":"","demo":"functions\/create-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","default":null,"x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","default":null,"x-example":"[VALUE]"}},"required":["key","value"]}}]}},"\/functions\/{functionId}\/variables\/{variableId}":{"get":{"summary":"Get Variable","operationId":"functionsGetVariable","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a variable by its unique ID.","responses":{"200":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"getVariable","weight":209,"cookies":false,"type":"","demo":"functions\/get-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"type":"string","x-example":"[VARIABLE_ID]","in":"path"}]},"put":{"summary":"Update Variable","operationId":"functionsUpdateVariable","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update variable by its unique ID.","responses":{"200":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"updateVariable","weight":210,"cookies":false,"type":"","demo":"functions\/update-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"type":"string","x-example":"[VARIABLE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","default":null,"x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","default":null,"x-example":"[VALUE]"}},"required":["key"]}}]},"delete":{"summary":"Delete Variable","operationId":"functionsDeleteVariable","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a variable by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteVariable","weight":211,"cookies":false,"type":"","demo":"functions\/delete-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"type":"string","x-example":"[VARIABLE_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":90,"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":102,"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 servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getCache","weight":93,"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 servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":92,"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\/pubsub":{"get":{"summary":"Get PubSub","operationId":"healthGetPubSub","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite pub-sub servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getPubSub","weight":95,"cookies":false,"type":"","demo":"health\/get-pub-sub.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.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":{"get":{"summary":"Get Queue","operationId":"healthGetQueue","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite queue messaging servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getQueue","weight":94,"cookies":false,"type":"","demo":"health\/get-queue.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.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":99,"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":100,"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":98,"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\/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":97,"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":101,"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":96,"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":83,"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":"localeListContinents","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":"listContinents","weight":87,"cookies":false,"type":"","demo":"locale\/list-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountries","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":"listCountries","weight":84,"cookies":false,"type":"","demo":"locale\/list-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesEU","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":"listCountriesEU","weight":85,"cookies":false,"type":"","demo":"locale\/list-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesPhones","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":"listCountriesPhones","weight":86,"cookies":false,"type":"","demo":"locale\/list-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCurrencies","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":"listCurrencies","weight":88,"cookies":false,"type":"","demo":"locale\/list-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListLanguages","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":"listLanguages","weight":89,"cookies":false,"type":"","demo":"locale\/list-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":[]}]}},"\/project\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["project"],"description":"","responses":{"200":{"description":"UsageProject","schema":{"$ref":"#\/definitions\/usageProject"}}},"x-appwrite":{"method":"getUsage","weight":135,"cookies":false,"type":"","demo":"project\/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":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/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":105,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":104,"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 `ID.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]"},"region":{"type":"string","description":"Project Region.","default":"default","x-example":"default"},"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":106,"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":107,"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":113,"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\/duration":{"patch":{"summary":"Update Project Authentication Duration","operationId":"projectsUpdateAuthDuration","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthDuration","weight":111,"cookies":false,"type":"","demo":"projects\/update-auth-duration.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":{"duration":{"type":"integer","description":"Project session length in seconds. Max length: 31536000 seconds.","default":null,"x-example":0}},"required":["duration"]}}]}},"\/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":110,"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":112,"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":131,"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":130,"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":132,"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":134,"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":133,"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":121,"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":120,"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. Maximum of 100 scopes are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","default":null,"x-example":"2020-10-15T06:38:00.000+00:00"}},"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":122,"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":123,"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. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","default":null,"x-example":"2020-10-15T06:38:00.000+00:00"}},"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":124,"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":109,"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":null,"x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","default":null,"x-example":"[SECRET]"},"enabled":{"type":"boolean","description":"Provider status. Set to 'false' to disable new session creation.","default":null,"x-example":false}},"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":126,"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":125,"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":null}},"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":127,"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":128,"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":null}},"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":129,"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":108,"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}\/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":115,"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":114,"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. Maximum of 100 events are allowed.","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":116,"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":117,"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. Maximum of 100 events are allowed.","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":119,"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"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhookSignature","weight":118,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.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":137,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":136,"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 `ID.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]"},"permissions":{"type":"array","description":"An array of permission strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","default":"none","x-example":"none"},"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"]}}]}},"\/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":138,"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":139,"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","default":"none","x-example":"none"},"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"]}}]},"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":140,"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.","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":142,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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\/storage#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":141,"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":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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 `ID.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":"permissions","description":"An array of permission strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"read(\"any\")\"]","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":143,"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":147,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":{"permissions":{"type":"array","description":"An array of permission string. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","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":148,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":145,"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":144,"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":146,"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":150,"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 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":149,"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.","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":152,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":151,"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 `ID.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). Maximum of 100 roles are allowed, each 32 characters long.","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":153,"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":154,"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":155,"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}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":162,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"List Team Memberships","operationId":"teamsListMemberships","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":"listMemberships","weight":157,"cookies":false,"type":"","demo":"teams\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":156,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","weight":158,"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":159,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":161,"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":160,"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":171,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":163,"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 `ID.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"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"},"password":{"type":"string","description":"Plain text 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"]}}]}},"\/users\/argon2":{"post":{"summary":"Create User with Argon2 Password","operationId":"usersCreateArgon2User","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createArgon2User","weight":166,"cookies":false,"type":"","demo":"users\/create-argon2user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-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 `ID.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 hashed using Argon2.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/bcrypt":{"post":{"summary":"Create User with Bcrypt Password","operationId":"usersCreateBcryptUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createBcryptUser","weight":164,"cookies":false,"type":"","demo":"users\/create-bcrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-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 `ID.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 hashed using Bcrypt.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/md5":{"post":{"summary":"Create User with MD5 Password","operationId":"usersCreateMD5User","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createMD5User","weight":165,"cookies":false,"type":"","demo":"users\/create-m-d5user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-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 `ID.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 hashed using MD5.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/phpass":{"post":{"summary":"Create User with PHPass Password","operationId":"usersCreatePHPassUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createPHPassUser","weight":168,"cookies":false,"type":"","demo":"users\/create-p-h-pass-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-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 `ID.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 hashed using PHPass.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/scrypt":{"post":{"summary":"Create User with Scrypt Password","operationId":"usersCreateScryptUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createScryptUser","weight":169,"cookies":false,"type":"","demo":"users\/create-scrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-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 `ID.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 hashed using Scrypt.","default":null,"x-example":"password"},"passwordSalt":{"type":"string","description":"Optional salt used to hash password.","default":null,"x-example":"[PASSWORD_SALT]"},"passwordCpu":{"type":"integer","description":"Optional CPU cost used to hash password.","default":null,"x-example":null},"passwordMemory":{"type":"integer","description":"Optional memory cost used to hash password.","default":null,"x-example":null},"passwordParallel":{"type":"integer","description":"Optional parallelization cost used to hash password.","default":null,"x-example":null},"passwordLength":{"type":"integer","description":"Optional hash length used to hash password.","default":null,"x-example":null},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordCpu","passwordMemory","passwordParallel","passwordLength"]}}]}},"\/users\/scrypt-modified":{"post":{"summary":"Create User with Scrypt Modified Password","operationId":"usersCreateScryptModifiedUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createScryptModifiedUser","weight":170,"cookies":false,"type":"","demo":"users\/create-scrypt-modified-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-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 `ID.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 hashed using Scrypt Modified.","default":null,"x-example":"password"},"passwordSalt":{"type":"string","description":"Salt used to hash password.","default":null,"x-example":"[PASSWORD_SALT]"},"passwordSaltSeparator":{"type":"string","description":"Salt separator used to hash password.","default":null,"x-example":"[PASSWORD_SALT_SEPARATOR]"},"passwordSignerKey":{"type":"string","description":"Signer key used to hash password.","default":null,"x-example":"[PASSWORD_SIGNER_KEY]"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordSaltSeparator","passwordSignerKey"]}}]}},"\/users\/sha":{"post":{"summary":"Create User with SHA Password","operationId":"usersCreateSHAUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createSHAUser","weight":167,"cookies":false,"type":"","demo":"users\/create-s-h-a-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-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 `ID.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 hashed using SHA.","default":null,"x-example":"password"},"passwordVersion":{"type":"string","description":"Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'","default":"","x-example":"sha1"},"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":189,"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"}]}},"\/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":172,"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, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":188,"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":182,"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":"List User Logs","operationId":"usersListLogs","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":"listLogs","weight":176,"cookies":false,"type":"","demo":"users\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"List User Memberships","operationId":"usersListMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"listMemberships","weight":175,"cookies":false,"type":"","demo":"users\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.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"}]}},"\/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":180,"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":181,"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}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":183,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.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":{"number":{"type":"string","description":"User phone number.","default":null,"x-example":"+12065550100"}},"required":["number"]}}]}},"\/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":173,"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":185,"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":"List User Sessions","operationId":"usersListSessions","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":"listSessions","weight":174,"cookies":false,"type":"","demo":"users\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":187,"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":186,"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. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":177,"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":"usersUpdateEmailVerification","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":"updateEmailVerification","weight":184,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-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"]}}]}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":179,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-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":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","x-globalAttributes":[]},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.","x-globalAttributes":[]},{"name":"databases","description":"The Databases service allows you to create structured collections of documents, query and filter lists of documents","x-globalAttributes":["databaseId"]},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location.","x-globalAttributes":[]},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health.","x-globalAttributes":[]},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"project","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"storage","description":"The Storage service allows you to manage your project files.","x-globalAttributes":[]},{"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","x-globalAttributes":[]},{"name":"users","description":"The Users service allows you to manage your project users.","x-globalAttributes":[]},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions.","x-globalAttributes":[]}],"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"]},"databaseList":{"description":"Databases List","type":"object","properties":{"total":{"type":"integer","description":"Total number of databases documents that matched your query.","x-example":5,"format":"int32"},"databases":{"type":"array","description":"List of databases.","items":{"type":"object","$ref":"#\/definitions\/database"},"x-example":""}},"required":["total","databases"]},"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"]},"variableList":{"description":"Variables List","type":"object","properties":{"total":{"type":"integer","description":"Total number of variables documents that matched your query.","x-example":5,"format":"int32"},"variables":{"type":"array","description":"List of variables.","items":{"type":"object","$ref":"#\/definitions\/variable"},"x-example":""}},"required":["total","variables"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"},"$createdAt":{"type":"string","description":"Database creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Database update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","name","$createdAt","$updatedAt"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Collection creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Collection update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Collection permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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\/attributeDatetime"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$permissions","databaseId","name","enabled","documentSecurity","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\/attributeDatetime"},{"$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"]},"attributeDatetime":{"description":"AttributeDatetime","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"birthDay"},"type":{"type":"string","description":"Attribute type.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"ISO 8601 format.","x-example":"datetime"},"default":{"type":"string","description":"Default value for attribute when not provided. Only null is optional","x-example":"2020-10-15T06:38:00.000+00:00","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":[],"x-nullable":true}},"required":["key","type","status","attributes"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collectionId":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"string","description":"Document creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Document update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Document permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]}},"additionalProperties":true,"required":["$id","$collectionId","$databaseId","$createdAt","$updatedAt","$permissions"]},"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":"string","description":"Log creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"password":{"type":"string","description":"Hashed user password.","x-example":"$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE"},"hash":{"type":"string","description":"Password hashing algorithm.","x-example":"argon2"},"hashOptions":{"type":"object","description":"Password hashing algorithm configuration.","x-example":{},"items":{"x-oneOf":[{"$ref":"#\/definitions\/algoArgon2"},{"$ref":"#\/definitions\/algoScrypt"},{"$ref":"#\/definitions\/algoScryptModified"},{"$ref":"#\/definitions\/algoBcrypt"},{"$ref":"#\/definitions\/algoPhpass"},{"$ref":"#\/definitions\/algoSha"},{"$ref":"#\/definitions\/algoMd5"}]}},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","password","hash","hashOptions","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"algoMd5":{"description":"AlgoMD5","type":"object"},"algoSha":{"description":"AlgoSHA","type":"object"},"algoPhpass":{"description":"AlgoPHPass","type":"object"},"algoBcrypt":{"description":"AlgoBcrypt","type":"object"},"algoScrypt":{"description":"AlgoScrypt","type":"object","properties":{"costCpu":{"type":"integer","description":"CPU complexity of computed hash.","x-example":8,"format":"int32"},"costMemory":{"type":"integer","description":"Memory complexity of computed hash.","x-example":14,"format":"int32"},"costParallel":{"type":"integer","description":"Parallelization of computed hash.","x-example":1,"format":"int32"},"length":{"type":"integer","description":"Length used to compute hash.","x-example":64,"format":"int32"}},"required":["costCpu","costMemory","costParallel","length"]},"algoScryptModified":{"description":"AlgoScryptModified","type":"object","properties":{"salt":{"type":"string","description":"Salt used to compute hash.","x-example":"UxLMreBr6tYyjQ=="},"saltSeparator":{"type":"string","description":"Separator used to compute hash.","x-example":"Bw=="},"signerKey":{"type":"string","description":"Key used to compute hash.","x-example":"XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ=="}},"required":["salt","saltSeparator","signerKey"]},"algoArgon2":{"description":"AlgoArgon2","type":"object","properties":{"memoryCost":{"type":"integer","description":"Memory used to compute hash.","x-example":65536,"format":"int32"},"timeCost":{"type":"integer","description":"Amount of time consumed to compute hash","x-example":4,"format":"int32"},"threads":{"type":"integer","description":"Number of threads used to compute hash.","x-example":3,"format":"int32"}},"required":["memoryCost","timeCost","threads"]},"account":{"description":"Account","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Session creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"string","description":"Session expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"The date of when the access token expires in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","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"},"$createdAt":{"type":"string","description":"Token creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"Token expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","$createdAt","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"},"$createdAt":{"type":"string","description":"File creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"File update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"File permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"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","$createdAt","$updatedAt","$permissions","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Bucket creation time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Bucket update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Bucket permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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"]},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).","x-example":"gzip"},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$createdAt","$updatedAt","$permissions","fileSecurity","name","enabled","maximumFileSize","allowedFileExtensions","compression","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Team creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Team update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Membership creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Membership update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"string","description":"Date, the user has been invited to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"joined":{"type":"string","description":"Date, the user has accepted the invitation to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Function creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Function update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"users"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"enabled":{"type":"boolean","description":"Function enabled.","x-example":false},"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":"array","description":"Function variables.","items":{"type":"object","$ref":"#\/definitions\/variable"},"x-example":[]},"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 * * *"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","runtime","deployment","vars","events","schedule","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"},"$createdAt":{"type":"string","description":"Deployment creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Deployment update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Execution creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Execution upate date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Execution roles.","items":{"type":"string"},"x-example":["any"]},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"duration":{"type":"number","description":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Project creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Project update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"authDuration":{"type":"integer","description":"Session duration in seconds.","x-example":60,"format":"int32"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"providers":{"type":"array","description":"List of Providers.","items":{"type":"object","$ref":"#\/definitions\/provider"},"x-example":{}},"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":{}},"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},"serviceStatusForDatabases":{"type":"boolean","description":"Databases 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","$createdAt","$updatedAt","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authDuration","authLimit","providers","platforms","webhooks","keys","domains","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Webhook creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Webhook update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"signatureKey":{"type":"string","description":"Signature key which can be used to validated incoming","x-example":"ad3d581ca230e2b7059c545e5a"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Key creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Key update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"expire":{"type":"string","description":"Key expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"},"accessedAt":{"type":"string","description":"Most recent access date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"sdks":{"type":"array","description":"List of SDK user agents that used this key.","items":{"type":"string"},"x-example":"appwrite:flutter"}},"required":["$id","$createdAt","$updatedAt","name","expire","scopes","secret","accessedAt","sdks"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Domain creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Domain update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"provider":{"description":"Provider","type":"object","properties":{"name":{"type":"string","description":"Provider name.","x-example":"GitHub"},"appId":{"type":"string","description":"OAuth 2.0 application ID.","x-example":"259125845563242502"},"secret":{"type":"string","description":"OAuth 2.0 application secret. Might be JSON string if provider requires extra configuration.","x-example":"Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ"},"enabled":{"type":"boolean","description":"Provider is active and can be used to create session.","x-example":""}},"required":["name","appId","secret","enabled"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Platform creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Platform update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","name","type","key","store","hostname","httpUser","httpPass"]},"variable":{"description":"Variable","type":"object","properties":{"$id":{"type":"string","description":"Variable ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"key":{"type":"string","description":"Variable key.","x-example":"API_KEY"},"value":{"type":"string","description":"Variable value.","x-example":"myPa$$word1"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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":{"name":{"type":"string","description":"Name of the service.","x-example":"database"},"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":["name","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"]},"metric":{"description":"Metric","type":"object","properties":{"value":{"type":"integer","description":"The value of this metric at the timestamp.","x-example":1,"format":"int32"},"date":{"type":"string","description":"The date at which this metric was aggregated in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["value","date"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","databasesTotal","collectionsTotal","documentsTotal"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","collectionsTotal","documentsTotal"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","documentsTotal"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersTotal":{"type":"array","description":"Aggregated stats for total number of users.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"sessionsTotal":{"type":"array","description":"Aggregated stats for sessions created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","usersTotal","sessionsTotal"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"bucketsTotal":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","bucketsTotal","filesTotal","storage"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","filesTotal","filesStorage"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsTotal":{"type":"array","description":"Aggregated stats for number of functions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"deploymentsTotal":{"type":"array","description":"Aggregated stats for number of function deployments.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"deploymentsStorage":{"type":"array","description":"Aggregated stats for function deployments storage.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsTotal":{"type":"array","description":"Aggregated stats for number of function builds.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsStorage":{"type":"array","description":"Aggregated stats for builds storage.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsTime":{"type":"array","description":"Aggregated stats for function build compute.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for number of function executions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsTime":{"type":"array","description":"Aggregated stats for function execution compute.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","functionsTotal","deploymentsTotal","deploymentsStorage","buildsTotal","buildsStorage","buildsTime","executionsTotal","executionsTime"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requestsTotal":{"type":"array","description":"Aggregated stats for number of requests.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databasesTotal":{"type":"array","description":"Aggregated stats for number of databases.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"usersTotal":{"type":"array","description":"Aggregated stats for number of users.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsTotal":{"type":"array","description":"Aggregated stats for number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","requestsTotal","network","executionsTotal","documentsTotal","databasesTotal","usersTotal","filesStorage","bucketsTotal"]}},"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 92bca3b96..47c7ce103 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"version":"1.1.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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"get","weight":18,"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":[]}]}},"\/account\/email":{"patch":{"summary":"Update 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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateEmail","weight":25,"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":"List Logs","operationId":"accountListLogs","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":"listLogs","weight":21,"cookies":false,"type":"","demo":"account\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Name","operationId":"accountUpdateName","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateName","weight":23,"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 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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePassword","weight":24,"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\/phone":{"patch":{"summary":"Update Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePhone","weight":26,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.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":{"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["phone","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":19,"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 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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePrefs","weight":27,"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":32,"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":33,"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":"List Sessions","operationId":"accountListSessions","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":"listSessions","weight":20,"cookies":false,"type":"","demo":"account\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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 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":31,"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","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":22,"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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":30,"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 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":29,"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\/status":{"patch":{"summary":"Update Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateStatus","weight":28,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.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\/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#accountUpdateEmailVerification). 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":34,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-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":35,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-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"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":36,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number 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":"updatePhoneVerification","weight":37,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":39,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":38,"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":42,"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. Country codes follow the [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":40,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":41,"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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":44,"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":"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.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":43,"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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.","responses":{"200":{"description":"Databases List","schema":{"$ref":"#\/definitions\/databaseList"}}},"x-appwrite":{"method":"list","weight":46,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Database.\n","responses":{"201":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"create","weight":45,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"databaseId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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":"[DATABASE_ID]","x-global":true},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["databaseId","name"]}}]}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.","responses":{"200":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"get","weight":47,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Update a database by its unique ID.","responses":{"200":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"update","weight":49,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_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]"}},"required":["name"]}}]},"delete":{"summary":"Delete Database","operationId":"databasesDelete","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":50,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"listCollections","weight":52,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":51,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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]"},"permissions":{"type":"array","description":"An array of permissions strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false}},"required":["collectionId","name"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":53,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"updateCollection","weight":55,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permission are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","default":true,"x-example":false}},"required":["name"]}}]},"delete":{"summary":"Delete Collection","operationId":"databasesDeleteCollection","consumes":["application\/json"],"produces":[],"tags":["databases"],"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":56,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":66,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a boolean attribute.\n","responses":{"202":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"createBooleanAttribute","weight":64,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":65,"cookies":false,"type":"","demo":"databases\/create-datetime-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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 the attribute in ISO 8601 format. Cannot be set when attribute is required.","default":null,"x-example":"2020-10-15T06:38:00.000+00:00"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create an email attribute.\n","responses":{"202":{"description":"AttributeEmail","schema":{"$ref":"#\/definitions\/attributeEmail"}}},"x-appwrite":{"method":"createEmailAttribute","weight":58,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":59,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 elements are allowed, each 4096 characters long.","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeFloat","schema":{"$ref":"#\/definitions\/attributeFloat"}}},"x-appwrite":{"method":"createFloatAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeInteger","schema":{"$ref":"#\/definitions\/attributeInteger"}}},"x-appwrite":{"method":"createIntegerAttribute","weight":62,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create IP address attribute.\n","responses":{"202":{"description":"AttributeIP","schema":{"$ref":"#\/definitions\/attributeIp"}}},"x-appwrite":{"method":"createIpAttribute","weight":60,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a string attribute.\n","responses":{"202":{"description":"AttributeString","schema":{"$ref":"#\/definitions\/attributeString"}}},"x-appwrite":{"method":"createStringAttribute","weight":57,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a URL attribute.\n","responses":{"202":{"description":"AttributeURL","schema":{"$ref":"#\/definitions\/attributeUrl"}}},"x-appwrite":{"method":"createUrlAttribute","weight":61,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime, or AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeString","schema":{"x-oneOf":[{"$ref":"#\/definitions\/attributeDatetime"},{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeDatetime"},{"$ref":"#\/definitions\/attributeString"}]}}},"x-appwrite":{"method":"getAttribute","weight":67,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteAttribute","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":68,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Attribute Key.","required":true,"type":"string","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all the user's documents in a given collection. You can use the query params to filter your results.","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":74,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":73,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 `ID.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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":75,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":77,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}}}}]},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":78,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":70,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":69,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 attributes are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":71,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteIndex","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":72,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":188,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":187,"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 `ID.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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","default":null,"x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","default":null,"x-example":"node-14.5"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","default":true,"x-example":false}},"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":189,"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":190,"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":193,"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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","default":null,"x-example":"[\"any\"]","items":{"type":"string"}},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","default":true,"x-example":false}},"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":195,"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":197,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: entrypoint, size, buildId, activate","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":{"202":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":196,"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":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"getDeployment","weight":198,"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":194,"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":199,"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":"Create Build","operationId":"functionsCreateBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":200,"cookies":false,"type":"","demo":"functions\/create-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.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"},{"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.","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":202,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, statusCode, duration","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":201,"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":"ip:{ip},userId:{userId}","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 in the background. Default value is false.","default":false,"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":203,"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"}]}},"\/functions\/{functionId}\/variables":{"get":{"summary":"List Variables","operationId":"functionsListVariables","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all variables of a specific function.","responses":{"200":{"description":"Variables List","schema":{"$ref":"#\/definitions\/variableList"}}},"x-appwrite":{"method":"listVariables","weight":205,"cookies":false,"type":"","demo":"functions\/list-variables.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-variables.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]},"post":{"summary":"Create Variable","operationId":"functionsCreateVariable","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Create a new function variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"createVariable","weight":204,"cookies":false,"type":"","demo":"functions\/create-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","default":null,"x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","default":null,"x-example":"[VALUE]"}},"required":["key","value"]}}]}},"\/functions\/{functionId}\/variables\/{variableId}":{"get":{"summary":"Get Variable","operationId":"functionsGetVariable","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a variable by its unique ID.","responses":{"200":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"getVariable","weight":206,"cookies":false,"type":"","demo":"functions\/get-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"type":"string","x-example":"[VARIABLE_ID]","in":"path"}]},"put":{"summary":"Update Variable","operationId":"functionsUpdateVariable","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update variable by its unique ID.","responses":{"200":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"updateVariable","weight":207,"cookies":false,"type":"","demo":"functions\/update-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"type":"string","x-example":"[VARIABLE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","default":null,"x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","default":null,"x-example":"[VALUE]"}},"required":["key"]}}]},"delete":{"summary":"Delete Variable","operationId":"functionsDeleteVariable","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a variable by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteVariable","weight":208,"cookies":false,"type":"","demo":"functions\/delete-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"type":"string","x-example":"[VARIABLE_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":89,"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":99,"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":92,"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":91,"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":96,"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":97,"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":95,"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\/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":94,"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":98,"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":93,"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":82,"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":"localeListContinents","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":"listContinents","weight":86,"cookies":false,"type":"","demo":"locale\/list-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountries","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":"listCountries","weight":83,"cookies":false,"type":"","demo":"locale\/list-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesEU","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":"listCountriesEU","weight":84,"cookies":false,"type":"","demo":"locale\/list-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesPhones","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":"listCountriesPhones","weight":85,"cookies":false,"type":"","demo":"locale\/list-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCurrencies","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":"listCurrencies","weight":87,"cookies":false,"type":"","demo":"locale\/list-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListLanguages","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":"listLanguages","weight":88,"cookies":false,"type":"","demo":"locale\/list-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":134,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":133,"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 `ID.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]"},"permissions":{"type":"array","description":"An array of permission strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","default":"none","x-example":"none"},"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"]}}]}},"\/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":135,"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":136,"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","default":"none","x-example":"none"},"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"]}}]},"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":137,"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.","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":139,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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\/storage#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":138,"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":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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 `ID.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":"permissions","description":"An array of permission strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"read(\"any\")\"]","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":140,"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":144,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":{"permissions":{"type":"array","description":"An array of permission string. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","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":145,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":142,"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":141,"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":143,"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.","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":149,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":148,"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 `ID.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). Maximum of 100 roles are allowed, each 32 characters long.","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":150,"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":151,"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":152,"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":"List Team Memberships","operationId":"teamsListMemberships","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":"listMemberships","weight":154,"cookies":false,"type":"","demo":"teams\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":153,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","weight":155,"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":156,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":158,"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":157,"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":168,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":160,"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 `ID.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"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"},"password":{"type":"string","description":"Plain text 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"]}}]}},"\/users\/argon2":{"post":{"summary":"Create User with Argon2 Password","operationId":"usersCreateArgon2User","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createArgon2User","weight":163,"cookies":false,"type":"","demo":"users\/create-argon2user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-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 `ID.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 hashed using Argon2.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/bcrypt":{"post":{"summary":"Create User with Bcrypt Password","operationId":"usersCreateBcryptUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createBcryptUser","weight":161,"cookies":false,"type":"","demo":"users\/create-bcrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-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 `ID.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 hashed using Bcrypt.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/md5":{"post":{"summary":"Create User with MD5 Password","operationId":"usersCreateMD5User","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createMD5User","weight":162,"cookies":false,"type":"","demo":"users\/create-m-d5user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-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 `ID.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 hashed using MD5.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/phpass":{"post":{"summary":"Create User with PHPass Password","operationId":"usersCreatePHPassUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createPHPassUser","weight":165,"cookies":false,"type":"","demo":"users\/create-p-h-pass-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-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 `ID.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 hashed using PHPass.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/scrypt":{"post":{"summary":"Create User with Scrypt Password","operationId":"usersCreateScryptUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createScryptUser","weight":166,"cookies":false,"type":"","demo":"users\/create-scrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-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 `ID.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 hashed using Scrypt.","default":null,"x-example":"password"},"passwordSalt":{"type":"string","description":"Optional salt used to hash password.","default":null,"x-example":"[PASSWORD_SALT]"},"passwordCpu":{"type":"integer","description":"Optional CPU cost used to hash password.","default":null,"x-example":null},"passwordMemory":{"type":"integer","description":"Optional memory cost used to hash password.","default":null,"x-example":null},"passwordParallel":{"type":"integer","description":"Optional parallelization cost used to hash password.","default":null,"x-example":null},"passwordLength":{"type":"integer","description":"Optional hash length used to hash password.","default":null,"x-example":null},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordCpu","passwordMemory","passwordParallel","passwordLength"]}}]}},"\/users\/scrypt-modified":{"post":{"summary":"Create User with Scrypt Modified Password","operationId":"usersCreateScryptModifiedUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createScryptModifiedUser","weight":167,"cookies":false,"type":"","demo":"users\/create-scrypt-modified-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-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 `ID.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 hashed using Scrypt Modified.","default":null,"x-example":"password"},"passwordSalt":{"type":"string","description":"Salt used to hash password.","default":null,"x-example":"[PASSWORD_SALT]"},"passwordSaltSeparator":{"type":"string","description":"Salt separator used to hash password.","default":null,"x-example":"[PASSWORD_SALT_SEPARATOR]"},"passwordSignerKey":{"type":"string","description":"Signer key used to hash password.","default":null,"x-example":"[PASSWORD_SIGNER_KEY]"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordSaltSeparator","passwordSignerKey"]}}]}},"\/users\/sha":{"post":{"summary":"Create User with SHA Password","operationId":"usersCreateSHAUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createSHAUser","weight":164,"cookies":false,"type":"","demo":"users\/create-s-h-a-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-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 `ID.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 hashed using SHA.","default":null,"x-example":"password"},"passwordVersion":{"type":"string","description":"Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'","default":"","x-example":"sha1"},"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":169,"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, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":185,"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":179,"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":"List User Logs","operationId":"usersListLogs","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":"listLogs","weight":173,"cookies":false,"type":"","demo":"users\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"List User Memberships","operationId":"usersListMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"listMemberships","weight":172,"cookies":false,"type":"","demo":"users\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.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"}]}},"\/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":177,"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":178,"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}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":180,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.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":{"number":{"type":"string","description":"User phone number.","default":null,"x-example":"+12065550100"}},"required":["number"]}}]}},"\/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":170,"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":182,"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":"List User Sessions","operationId":"usersListSessions","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":"listSessions","weight":171,"cookies":false,"type":"","demo":"users\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":184,"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":183,"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. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":174,"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":"usersUpdateEmailVerification","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":"updateEmailVerification","weight":181,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-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"]}}]}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":176,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-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":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","x-globalAttributes":[]},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.","x-globalAttributes":[]},{"name":"databases","description":"The Databases service allows you to create structured collections of documents, query and filter lists of documents","x-globalAttributes":["databaseId"]},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location.","x-globalAttributes":[]},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health.","x-globalAttributes":[]},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"storage","description":"The Storage service allows you to manage your project files.","x-globalAttributes":[]},{"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","x-globalAttributes":[]},{"name":"users","description":"The Users service allows you to manage your project users.","x-globalAttributes":[]},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions.","x-globalAttributes":[]}],"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"]},"databaseList":{"description":"Databases List","type":"object","properties":{"total":{"type":"integer","description":"Total number of databases documents that matched your query.","x-example":5,"format":"int32"},"databases":{"type":"array","description":"List of databases.","items":{"type":"object","$ref":"#\/definitions\/database"},"x-example":""}},"required":["total","databases"]},"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"]},"variableList":{"description":"Variables List","type":"object","properties":{"total":{"type":"integer","description":"Total number of variables documents that matched your query.","x-example":5,"format":"int32"},"variables":{"type":"array","description":"List of variables.","items":{"type":"object","$ref":"#\/definitions\/variable"},"x-example":""}},"required":["total","variables"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"},"$createdAt":{"type":"string","description":"Database creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Database update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","name","$createdAt","$updatedAt"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Collection creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Collection update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Collection permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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\/attributeDatetime"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$permissions","databaseId","name","enabled","documentSecurity","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\/attributeDatetime"},{"$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"]},"attributeDatetime":{"description":"AttributeDatetime","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"birthDay"},"type":{"type":"string","description":"Attribute type.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"ISO 8601 format.","x-example":"datetime"},"default":{"type":"string","description":"Default value for attribute when not provided. Only null is optional","x-example":"2020-10-15T06:38:00.000+00:00","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":[],"x-nullable":true}},"required":["key","type","status","attributes"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collectionId":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"string","description":"Document creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Document update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Document permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]}},"additionalProperties":true,"required":["$id","$collectionId","$databaseId","$createdAt","$updatedAt","$permissions"]},"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":"string","description":"Log creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"password":{"type":"string","description":"Hashed user password.","x-example":"$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE"},"hash":{"type":"string","description":"Password hashing algorithm.","x-example":"argon2"},"hashOptions":{"type":"object","description":"Password hashing algorithm configuration.","x-example":{},"items":{"x-oneOf":[{"$ref":"#\/definitions\/algoArgon2"},{"$ref":"#\/definitions\/algoScrypt"},{"$ref":"#\/definitions\/algoScryptModified"},{"$ref":"#\/definitions\/algoBcrypt"},{"$ref":"#\/definitions\/algoPhpass"},{"$ref":"#\/definitions\/algoSha"},{"$ref":"#\/definitions\/algoMd5"}]}},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","password","hash","hashOptions","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"algoMd5":{"description":"AlgoMD5","type":"object"},"algoSha":{"description":"AlgoSHA","type":"object"},"algoPhpass":{"description":"AlgoPHPass","type":"object"},"algoBcrypt":{"description":"AlgoBcrypt","type":"object"},"algoScrypt":{"description":"AlgoScrypt","type":"object","properties":{"costCpu":{"type":"integer","description":"CPU complexity of computed hash.","x-example":8,"format":"int32"},"costMemory":{"type":"integer","description":"Memory complexity of computed hash.","x-example":14,"format":"int32"},"costParallel":{"type":"integer","description":"Parallelization of computed hash.","x-example":1,"format":"int32"},"length":{"type":"integer","description":"Length used to compute hash.","x-example":64,"format":"int32"}},"required":["costCpu","costMemory","costParallel","length"]},"algoScryptModified":{"description":"AlgoScryptModified","type":"object","properties":{"salt":{"type":"string","description":"Salt used to compute hash.","x-example":"UxLMreBr6tYyjQ=="},"saltSeparator":{"type":"string","description":"Separator used to compute hash.","x-example":"Bw=="},"signerKey":{"type":"string","description":"Key used to compute hash.","x-example":"XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ=="}},"required":["salt","saltSeparator","signerKey"]},"algoArgon2":{"description":"AlgoArgon2","type":"object","properties":{"memoryCost":{"type":"integer","description":"Memory used to compute hash.","x-example":65536,"format":"int32"},"timeCost":{"type":"integer","description":"Amount of time consumed to compute hash","x-example":4,"format":"int32"},"threads":{"type":"integer","description":"Number of threads used to compute hash.","x-example":3,"format":"int32"}},"required":["memoryCost","timeCost","threads"]},"account":{"description":"Account","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Session creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"string","description":"Session expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"The date of when the access token expires in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","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"},"$createdAt":{"type":"string","description":"Token creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"Token expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","$createdAt","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"},"$createdAt":{"type":"string","description":"File creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"File update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"File permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"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","$createdAt","$updatedAt","$permissions","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Bucket creation time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Bucket update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Bucket permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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"]},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).","x-example":"gzip"},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$createdAt","$updatedAt","$permissions","fileSecurity","name","enabled","maximumFileSize","allowedFileExtensions","compression","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Team creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Team update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Membership creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Membership update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"string","description":"Date, the user has been invited to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"joined":{"type":"string","description":"Date, the user has accepted the invitation to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Function creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Function update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"users"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"enabled":{"type":"boolean","description":"Function enabled.","x-example":false},"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":"array","description":"Function variables.","items":{"type":"object","$ref":"#\/definitions\/variable"},"x-example":[]},"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":"string","description":"Function's next scheduled execution time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"schedulePrevious":{"type":"string","description":"Function's previous scheduled execution time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","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"},"$createdAt":{"type":"string","description":"Deployment creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Deployment update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Execution creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Execution upate date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Execution roles.","items":{"type":"string"},"x-example":["any"]},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"duration":{"type":"number","description":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"variable":{"description":"Variable","type":"object","properties":{"$id":{"type":"string","description":"Variable ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"key":{"type":"string","description":"Variable key.","x-example":"API_KEY"},"value":{"type":"string","description":"Variable value.","x-example":"myPa$$word1"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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":"1.1.2","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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"get","weight":19,"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":[]}]}},"\/account\/email":{"patch":{"summary":"Update 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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateEmail","weight":26,"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":"List Logs","operationId":"accountListLogs","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":"listLogs","weight":22,"cookies":false,"type":"","demo":"account\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Name","operationId":"accountUpdateName","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateName","weight":24,"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 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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePassword","weight":25,"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\/phone":{"patch":{"summary":"Update Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.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":{"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["phone","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":20,"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 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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePrefs","weight":28,"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":33,"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":34,"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":"List Sessions","operationId":"accountListSessions","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":"listSessions","weight":21,"cookies":false,"type":"","demo":"account\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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 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":32,"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","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":23,"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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":31,"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 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":30,"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\/status":{"patch":{"summary":"Update Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateStatus","weight":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.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\/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#accountUpdateEmailVerification). 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":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-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":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-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"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number 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":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":40,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":39,"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":43,"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. Country codes follow the [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":41,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":42,"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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":45,"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":"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.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":44,"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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.","responses":{"200":{"description":"Databases List","schema":{"$ref":"#\/definitions\/databaseList"}}},"x-appwrite":{"method":"list","weight":47,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Database.\n","responses":{"201":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"create","weight":46,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"databaseId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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":"[DATABASE_ID]","x-global":true},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["databaseId","name"]}}]}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.","responses":{"200":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"get","weight":48,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Update a database by its unique ID.","responses":{"200":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"update","weight":50,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_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]"}},"required":["name"]}}]},"delete":{"summary":"Delete Database","operationId":"databasesDelete","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":51,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"listCollections","weight":53,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":52,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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]"},"permissions":{"type":"array","description":"An array of permissions strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false}},"required":["collectionId","name"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":54,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"updateCollection","weight":56,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permission are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","default":true,"x-example":false}},"required":["name"]}}]},"delete":{"summary":"Delete Collection","operationId":"databasesDeleteCollection","consumes":["application\/json"],"produces":[],"tags":["databases"],"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":57,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":67,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a boolean attribute.\n","responses":{"202":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"createBooleanAttribute","weight":65,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":66,"cookies":false,"type":"","demo":"databases\/create-datetime-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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 the attribute in ISO 8601 format. Cannot be set when attribute is required.","default":null,"x-example":"2020-10-15T06:38:00.000+00:00"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create an email attribute.\n","responses":{"202":{"description":"AttributeEmail","schema":{"$ref":"#\/definitions\/attributeEmail"}}},"x-appwrite":{"method":"createEmailAttribute","weight":59,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":60,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 elements are allowed, each 4096 characters long.","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeFloat","schema":{"$ref":"#\/definitions\/attributeFloat"}}},"x-appwrite":{"method":"createFloatAttribute","weight":64,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeInteger","schema":{"$ref":"#\/definitions\/attributeInteger"}}},"x-appwrite":{"method":"createIntegerAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create IP address attribute.\n","responses":{"202":{"description":"AttributeIP","schema":{"$ref":"#\/definitions\/attributeIp"}}},"x-appwrite":{"method":"createIpAttribute","weight":61,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a string attribute.\n","responses":{"202":{"description":"AttributeString","schema":{"$ref":"#\/definitions\/attributeString"}}},"x-appwrite":{"method":"createStringAttribute","weight":58,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a URL attribute.\n","responses":{"202":{"description":"AttributeURL","schema":{"$ref":"#\/definitions\/attributeUrl"}}},"x-appwrite":{"method":"createUrlAttribute","weight":62,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime, or AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeString","schema":{"x-oneOf":[{"$ref":"#\/definitions\/attributeDatetime"},{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeDatetime"},{"$ref":"#\/definitions\/attributeString"}]}}},"x-appwrite":{"method":"getAttribute","weight":68,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteAttribute","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":69,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Attribute Key.","required":true,"type":"string","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all the user's documents in a given collection. You can use the query params to filter your results.","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":75,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":74,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 `ID.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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":76,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":78,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}}}}]},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":79,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":71,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":70,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 attributes are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":72,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteIndex","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":73,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":191,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":190,"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 `ID.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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","default":null,"x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","default":null,"x-example":"node-14.5"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","default":true,"x-example":false}},"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":192,"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":193,"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":196,"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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","default":null,"x-example":"[\"any\"]","items":{"type":"string"}},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","default":true,"x-example":false}},"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":198,"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":200,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: entrypoint, size, buildId, activate","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":{"202":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":199,"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":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"getDeployment","weight":201,"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":197,"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":202,"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":"Create Build","operationId":"functionsCreateBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":203,"cookies":false,"type":"","demo":"functions\/create-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.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"},{"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.","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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, statusCode, duration","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":"ip:{ip},userId:{userId}","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 in the background. Default value is false.","default":false,"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"}]}},"\/functions\/{functionId}\/variables":{"get":{"summary":"List Variables","operationId":"functionsListVariables","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all variables of a specific function.","responses":{"200":{"description":"Variables List","schema":{"$ref":"#\/definitions\/variableList"}}},"x-appwrite":{"method":"listVariables","weight":208,"cookies":false,"type":"","demo":"functions\/list-variables.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-variables.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]},"post":{"summary":"Create Variable","operationId":"functionsCreateVariable","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Create a new function variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"createVariable","weight":207,"cookies":false,"type":"","demo":"functions\/create-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","default":null,"x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","default":null,"x-example":"[VALUE]"}},"required":["key","value"]}}]}},"\/functions\/{functionId}\/variables\/{variableId}":{"get":{"summary":"Get Variable","operationId":"functionsGetVariable","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a variable by its unique ID.","responses":{"200":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"getVariable","weight":209,"cookies":false,"type":"","demo":"functions\/get-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"type":"string","x-example":"[VARIABLE_ID]","in":"path"}]},"put":{"summary":"Update Variable","operationId":"functionsUpdateVariable","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update variable by its unique ID.","responses":{"200":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"updateVariable","weight":210,"cookies":false,"type":"","demo":"functions\/update-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"type":"string","x-example":"[VARIABLE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","default":null,"x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","default":null,"x-example":"[VALUE]"}},"required":["key"]}}]},"delete":{"summary":"Delete Variable","operationId":"functionsDeleteVariable","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a variable by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteVariable","weight":211,"cookies":false,"type":"","demo":"functions\/delete-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"type":"string","x-example":"[VARIABLE_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":90,"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":102,"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 servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getCache","weight":93,"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 servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":92,"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\/pubsub":{"get":{"summary":"Get PubSub","operationId":"healthGetPubSub","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite pub-sub servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getPubSub","weight":95,"cookies":false,"type":"","demo":"health\/get-pub-sub.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.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":{"get":{"summary":"Get Queue","operationId":"healthGetQueue","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite queue messaging servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getQueue","weight":94,"cookies":false,"type":"","demo":"health\/get-queue.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.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":99,"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":100,"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":98,"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\/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":97,"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":101,"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":96,"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":83,"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":"localeListContinents","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":"listContinents","weight":87,"cookies":false,"type":"","demo":"locale\/list-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountries","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":"listCountries","weight":84,"cookies":false,"type":"","demo":"locale\/list-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesEU","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":"listCountriesEU","weight":85,"cookies":false,"type":"","demo":"locale\/list-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesPhones","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":"listCountriesPhones","weight":86,"cookies":false,"type":"","demo":"locale\/list-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCurrencies","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":"listCurrencies","weight":88,"cookies":false,"type":"","demo":"locale\/list-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListLanguages","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":"listLanguages","weight":89,"cookies":false,"type":"","demo":"locale\/list-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":137,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":136,"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 `ID.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]"},"permissions":{"type":"array","description":"An array of permission strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","default":"none","x-example":"none"},"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"]}}]}},"\/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":138,"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":139,"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","default":"none","x-example":"none"},"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"]}}]},"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":140,"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.","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":142,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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\/storage#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":141,"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":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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 `ID.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":"permissions","description":"An array of permission strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"read(\"any\")\"]","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":143,"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":147,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":{"permissions":{"type":"array","description":"An array of permission string. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","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":148,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":145,"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":144,"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":146,"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.","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":152,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":151,"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 `ID.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). Maximum of 100 roles are allowed, each 32 characters long.","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":153,"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":154,"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":155,"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":"List Team Memberships","operationId":"teamsListMemberships","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":"listMemberships","weight":157,"cookies":false,"type":"","demo":"teams\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":156,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","weight":158,"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":159,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":161,"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":160,"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":171,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":163,"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 `ID.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"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"},"password":{"type":"string","description":"Plain text 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"]}}]}},"\/users\/argon2":{"post":{"summary":"Create User with Argon2 Password","operationId":"usersCreateArgon2User","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createArgon2User","weight":166,"cookies":false,"type":"","demo":"users\/create-argon2user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-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 `ID.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 hashed using Argon2.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/bcrypt":{"post":{"summary":"Create User with Bcrypt Password","operationId":"usersCreateBcryptUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createBcryptUser","weight":164,"cookies":false,"type":"","demo":"users\/create-bcrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-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 `ID.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 hashed using Bcrypt.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/md5":{"post":{"summary":"Create User with MD5 Password","operationId":"usersCreateMD5User","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createMD5User","weight":165,"cookies":false,"type":"","demo":"users\/create-m-d5user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-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 `ID.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 hashed using MD5.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/phpass":{"post":{"summary":"Create User with PHPass Password","operationId":"usersCreatePHPassUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createPHPassUser","weight":168,"cookies":false,"type":"","demo":"users\/create-p-h-pass-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-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 `ID.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 hashed using PHPass.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/scrypt":{"post":{"summary":"Create User with Scrypt Password","operationId":"usersCreateScryptUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createScryptUser","weight":169,"cookies":false,"type":"","demo":"users\/create-scrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-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 `ID.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 hashed using Scrypt.","default":null,"x-example":"password"},"passwordSalt":{"type":"string","description":"Optional salt used to hash password.","default":null,"x-example":"[PASSWORD_SALT]"},"passwordCpu":{"type":"integer","description":"Optional CPU cost used to hash password.","default":null,"x-example":null},"passwordMemory":{"type":"integer","description":"Optional memory cost used to hash password.","default":null,"x-example":null},"passwordParallel":{"type":"integer","description":"Optional parallelization cost used to hash password.","default":null,"x-example":null},"passwordLength":{"type":"integer","description":"Optional hash length used to hash password.","default":null,"x-example":null},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordCpu","passwordMemory","passwordParallel","passwordLength"]}}]}},"\/users\/scrypt-modified":{"post":{"summary":"Create User with Scrypt Modified Password","operationId":"usersCreateScryptModifiedUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createScryptModifiedUser","weight":170,"cookies":false,"type":"","demo":"users\/create-scrypt-modified-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-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 `ID.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 hashed using Scrypt Modified.","default":null,"x-example":"password"},"passwordSalt":{"type":"string","description":"Salt used to hash password.","default":null,"x-example":"[PASSWORD_SALT]"},"passwordSaltSeparator":{"type":"string","description":"Salt separator used to hash password.","default":null,"x-example":"[PASSWORD_SALT_SEPARATOR]"},"passwordSignerKey":{"type":"string","description":"Signer key used to hash password.","default":null,"x-example":"[PASSWORD_SIGNER_KEY]"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordSaltSeparator","passwordSignerKey"]}}]}},"\/users\/sha":{"post":{"summary":"Create User with SHA Password","operationId":"usersCreateSHAUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createSHAUser","weight":167,"cookies":false,"type":"","demo":"users\/create-s-h-a-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-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 `ID.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 hashed using SHA.","default":null,"x-example":"password"},"passwordVersion":{"type":"string","description":"Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'","default":"","x-example":"sha1"},"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":172,"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, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":188,"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":182,"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":"List User Logs","operationId":"usersListLogs","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":"listLogs","weight":176,"cookies":false,"type":"","demo":"users\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"List User Memberships","operationId":"usersListMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"listMemberships","weight":175,"cookies":false,"type":"","demo":"users\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.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"}]}},"\/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":180,"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":181,"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}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":183,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.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":{"number":{"type":"string","description":"User phone number.","default":null,"x-example":"+12065550100"}},"required":["number"]}}]}},"\/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":173,"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":185,"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":"List User Sessions","operationId":"usersListSessions","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":"listSessions","weight":174,"cookies":false,"type":"","demo":"users\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":187,"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":186,"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. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":177,"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":"usersUpdateEmailVerification","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":"updateEmailVerification","weight":184,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-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"]}}]}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":179,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-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":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","x-globalAttributes":[]},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.","x-globalAttributes":[]},{"name":"databases","description":"The Databases service allows you to create structured collections of documents, query and filter lists of documents","x-globalAttributes":["databaseId"]},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location.","x-globalAttributes":[]},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health.","x-globalAttributes":[]},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"project","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"storage","description":"The Storage service allows you to manage your project files.","x-globalAttributes":[]},{"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","x-globalAttributes":[]},{"name":"users","description":"The Users service allows you to manage your project users.","x-globalAttributes":[]},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions.","x-globalAttributes":[]}],"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"]},"databaseList":{"description":"Databases List","type":"object","properties":{"total":{"type":"integer","description":"Total number of databases documents that matched your query.","x-example":5,"format":"int32"},"databases":{"type":"array","description":"List of databases.","items":{"type":"object","$ref":"#\/definitions\/database"},"x-example":""}},"required":["total","databases"]},"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"]},"variableList":{"description":"Variables List","type":"object","properties":{"total":{"type":"integer","description":"Total number of variables documents that matched your query.","x-example":5,"format":"int32"},"variables":{"type":"array","description":"List of variables.","items":{"type":"object","$ref":"#\/definitions\/variable"},"x-example":""}},"required":["total","variables"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"},"$createdAt":{"type":"string","description":"Database creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Database update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","name","$createdAt","$updatedAt"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Collection creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Collection update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Collection permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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\/attributeDatetime"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$permissions","databaseId","name","enabled","documentSecurity","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\/attributeDatetime"},{"$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"]},"attributeDatetime":{"description":"AttributeDatetime","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"birthDay"},"type":{"type":"string","description":"Attribute type.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"ISO 8601 format.","x-example":"datetime"},"default":{"type":"string","description":"Default value for attribute when not provided. Only null is optional","x-example":"2020-10-15T06:38:00.000+00:00","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":[],"x-nullable":true}},"required":["key","type","status","attributes"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collectionId":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"string","description":"Document creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Document update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Document permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]}},"additionalProperties":true,"required":["$id","$collectionId","$databaseId","$createdAt","$updatedAt","$permissions"]},"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":"string","description":"Log creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"password":{"type":"string","description":"Hashed user password.","x-example":"$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE"},"hash":{"type":"string","description":"Password hashing algorithm.","x-example":"argon2"},"hashOptions":{"type":"object","description":"Password hashing algorithm configuration.","x-example":{},"items":{"x-oneOf":[{"$ref":"#\/definitions\/algoArgon2"},{"$ref":"#\/definitions\/algoScrypt"},{"$ref":"#\/definitions\/algoScryptModified"},{"$ref":"#\/definitions\/algoBcrypt"},{"$ref":"#\/definitions\/algoPhpass"},{"$ref":"#\/definitions\/algoSha"},{"$ref":"#\/definitions\/algoMd5"}]}},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","password","hash","hashOptions","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"algoMd5":{"description":"AlgoMD5","type":"object"},"algoSha":{"description":"AlgoSHA","type":"object"},"algoPhpass":{"description":"AlgoPHPass","type":"object"},"algoBcrypt":{"description":"AlgoBcrypt","type":"object"},"algoScrypt":{"description":"AlgoScrypt","type":"object","properties":{"costCpu":{"type":"integer","description":"CPU complexity of computed hash.","x-example":8,"format":"int32"},"costMemory":{"type":"integer","description":"Memory complexity of computed hash.","x-example":14,"format":"int32"},"costParallel":{"type":"integer","description":"Parallelization of computed hash.","x-example":1,"format":"int32"},"length":{"type":"integer","description":"Length used to compute hash.","x-example":64,"format":"int32"}},"required":["costCpu","costMemory","costParallel","length"]},"algoScryptModified":{"description":"AlgoScryptModified","type":"object","properties":{"salt":{"type":"string","description":"Salt used to compute hash.","x-example":"UxLMreBr6tYyjQ=="},"saltSeparator":{"type":"string","description":"Separator used to compute hash.","x-example":"Bw=="},"signerKey":{"type":"string","description":"Key used to compute hash.","x-example":"XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ=="}},"required":["salt","saltSeparator","signerKey"]},"algoArgon2":{"description":"AlgoArgon2","type":"object","properties":{"memoryCost":{"type":"integer","description":"Memory used to compute hash.","x-example":65536,"format":"int32"},"timeCost":{"type":"integer","description":"Amount of time consumed to compute hash","x-example":4,"format":"int32"},"threads":{"type":"integer","description":"Number of threads used to compute hash.","x-example":3,"format":"int32"}},"required":["memoryCost","timeCost","threads"]},"account":{"description":"Account","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Session creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"string","description":"Session expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"The date of when the access token expires in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","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"},"$createdAt":{"type":"string","description":"Token creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"Token expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","$createdAt","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"},"$createdAt":{"type":"string","description":"File creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"File update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"File permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"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","$createdAt","$updatedAt","$permissions","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Bucket creation time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Bucket update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Bucket permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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"]},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).","x-example":"gzip"},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$createdAt","$updatedAt","$permissions","fileSecurity","name","enabled","maximumFileSize","allowedFileExtensions","compression","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Team creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Team update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Membership creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Membership update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"string","description":"Date, the user has been invited to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"joined":{"type":"string","description":"Date, the user has accepted the invitation to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Function creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Function update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"users"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"enabled":{"type":"boolean","description":"Function enabled.","x-example":false},"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":"array","description":"Function variables.","items":{"type":"object","$ref":"#\/definitions\/variable"},"x-example":[]},"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 * * *"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","runtime","deployment","vars","events","schedule","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"},"$createdAt":{"type":"string","description":"Deployment creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Deployment update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Execution creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Execution upate date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Execution roles.","items":{"type":"string"},"x-example":["any"]},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"duration":{"type":"number","description":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"variable":{"description":"Variable","type":"object","properties":{"$id":{"type":"string","description":"Variable ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"key":{"type":"string","description":"Variable key.","x-example":"API_KEY"},"value":{"type":"string","description":"Variable value.","x-example":"myPa$$word1"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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":{"name":{"type":"string","description":"Name of the service.","x-example":"database"},"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":["name","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/src/Appwrite/Platform/Tasks/SDKs.php b/src/Appwrite/Platform/Tasks/SDKs.php index e580c5b6b..435c7eca4 100644 --- a/src/Appwrite/Platform/Tasks/SDKs.php +++ b/src/Appwrite/Platform/Tasks/SDKs.php @@ -65,19 +65,19 @@ class SDKs extends Action Console::info('Fetching API Spec for ' . $language['name'] . ' for ' . $platform['name'] . ' (version: ' . $version . ')'); - $spec = file_get_contents(__DIR__ . '/../../../app/config/specs/swagger2-' . $version . '-' . $language['family'] . '.json'); + $spec = file_get_contents(__DIR__ . '/../../../../app/config/specs/swagger2-' . $version . '-' . $language['family'] . '.json'); $cover = 'https://appwrite.io/images/github.png'; - $result = \realpath(__DIR__ . '/../../../app') . '/sdks/' . $key . '-' . $language['key']; - $resultExamples = \realpath(__DIR__ . '/../../..') . '/docs/examples/' . $version . '/' . $key . '-' . $language['key']; - $target = \realpath(__DIR__ . '/../../../app') . '/sdks/git/' . $language['key'] . '/'; - $readme = \realpath(__DIR__ . '/../../../docs/sdks/' . $language['key'] . '/README.md'); + $result = \realpath(__DIR__ . '/../../../../app') . '/sdks/' . $key . '-' . $language['key']; + $resultExamples = \realpath(__DIR__ . '/../../../..') . '/docs/examples/' . $version . '/' . $key . '-' . $language['key']; + $target = \realpath(__DIR__ . '/../../../../app') . '/sdks/git/' . $language['key'] . '/'; + $readme = \realpath(__DIR__ . '/../../../../docs/sdks/' . $language['key'] . '/README.md'); $readme = ($readme) ? \file_get_contents($readme) : ''; - $gettingStarted = \realpath(__DIR__ . '/../../../docs/sdks/' . $language['key'] . '/GETTING_STARTED.md'); + $gettingStarted = \realpath(__DIR__ . '/../../../../docs/sdks/' . $language['key'] . '/GETTING_STARTED.md'); $gettingStarted = ($gettingStarted) ? \file_get_contents($gettingStarted) : ''; - $examples = \realpath(__DIR__ . '/../../../docs/sdks/' . $language['key'] . '/EXAMPLES.md'); + $examples = \realpath(__DIR__ . '/../../../../docs/sdks/' . $language['key'] . '/EXAMPLES.md'); $examples = ($examples) ? \file_get_contents($examples) : ''; - $changelog = \realpath(__DIR__ . '/../../../docs/sdks/' . $language['key'] . '/CHANGELOG.md'); + $changelog = \realpath(__DIR__ . '/../../../../docs/sdks/' . $language['key'] . '/CHANGELOG.md'); $changelog = ($changelog) ? \file_get_contents($changelog) : '# Change Log'; $warning = '**This SDK is compatible with Appwrite server version ' . $version . '. For older versions, please check [previous releases](' . $language['url'] . '/releases).**'; $license = 'BSD-3-Clause'; diff --git a/src/Appwrite/Platform/Tasks/Specs.php b/src/Appwrite/Platform/Tasks/Specs.php index 10f322f19..82caf8ef7 100644 --- a/src/Appwrite/Platform/Tasks/Specs.php +++ b/src/Appwrite/Platform/Tasks/Specs.php @@ -40,8 +40,8 @@ class Specs extends Action public function action(string $version, string $mode, Registry $register): void { - $db = $register->get('db'); - $redis = $register->get('cache'); + //$db = $register->get('db'); + //$redis = $register->get('cache'); $appRoutes = App::getRoutes(); $response = new Response(new HttpResponse()); $mocks = ($mode === 'mocks'); @@ -266,7 +266,7 @@ class Specs extends Action continue; } - $path = __DIR__ . '/../../../app/config/specs/' . $format . '-' . $version . '-' . $platform . '.json'; + $path = __DIR__ . '/../../../../app/config/specs/' . $format . '-' . $version . '-' . $platform . '.json'; if (!file_put_contents($path, json_encode($specs->parse()))) { throw new Exception('Failed to save spec file: ' . $path); From ff6cb8d267255b58a462e31354d52629ace7fc52 Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 8 Feb 2023 18:48:51 +0200 Subject: [PATCH 85/94] addressing comments --- CHANGES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b1f8b9560..c2121c80e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,7 +7,7 @@ - Store build output file size [#4844](https://github.com/appwrite/appwrite/pull/4844) - Fix max mimetype size [#4814](https://github.com/appwrite/appwrite/pull/4814) - New usage metrics collection flow [#4770](https://github.com/appwrite/appwrite/pull/4770) - - Deprecated influxdb, statsd, telegraf containers and removed all of their occurrences from the code. + - Deprecated influxdb, telegraf containers and removed all of their occurrences from the code. - Removed _APP_INFLUXDB_HOST, _APP_INFLUXDB_PORT, _APP_STATSD_HOST, _APP_STATSD_PORT env variables. - Removed usage labels dependency. - Usage metrics are processed via new usage worker. @@ -31,7 +31,7 @@ - databasesCount to databasesTotal, collectionsCount to collectionsTotal, documentsCount to documentsTotal. - Functions - deprecated - - executionsFailure, executionsSuccess, buildsFailure, buildsSuccess, executionsFailure, executionsSuccess + - executionsFailure, executionsSuccess, buildsFailure, buildsSuccess, executionsFailure, executionsSuccess. - renamed - executionsTime to executionsCompute, buildsTime to buildsCompute, documentsCount to documentsTotal. - added From aad9a68626933975edc273e670752225c22e9b9e Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 14 Feb 2023 16:25:33 +0200 Subject: [PATCH 86/94] versions update --- composer.json | 6 +-- composer.lock | 127 +++++++++++++++++++------------------------------- 2 files changed, 51 insertions(+), 82 deletions(-) diff --git a/composer.json b/composer.json index 77812ce9b..63504def3 100644 --- a/composer.json +++ b/composer.json @@ -43,13 +43,13 @@ "ext-sockets": "*", "appwrite/php-clamav": "1.1.*", "appwrite/php-runtimes": "0.11.*", - "utopia-php/abuse": "0.16.*", + "utopia-php/abuse": "0.18.*", "utopia-php/analytics": "0.2.*", - "utopia-php/audit": "0.17.*", + "utopia-php/audit": "0.20.*", "utopia-php/cache": "0.8.*", "utopia-php/cli": "0.14.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "dev-increment as 0.28.0", + "utopia-php/database": "0.30.*", "utopia-php/queue": "0.5.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.3.*", diff --git a/composer.lock b/composer.lock index b810568d9..75fa3c7cc 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": "290f8f03716871b264f9dd88b0ef60a9", + "content-hash": "3f126c671dad4d5dca48b41a8171ac92", "packages": [ { "name": "adhocore/jwt", @@ -1139,25 +1139,27 @@ }, { "name": "utopia-php/abuse", - "version": "0.16.0", + "version": "0.18.0", "source": { "type": "git", "url": "https://github.com/utopia-php/abuse.git", - "reference": "6370d9150425460416583feba0990504ac789e98" + "reference": "8496401234f73a49f8c4259d3e89ab4a7c1f9ecf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/abuse/zipball/6370d9150425460416583feba0990504ac789e98", - "reference": "6370d9150425460416583feba0990504ac789e98", + "url": "https://api.github.com/repos/utopia-php/abuse/zipball/8496401234f73a49f8c4259d3e89ab4a7c1f9ecf", + "reference": "8496401234f73a49f8c4259d3e89ab4a7c1f9ecf", "shasum": "" }, "require": { "ext-curl": "*", "ext-pdo": "*", "php": ">=8.0", - "utopia-php/database": "0.28.*" + "utopia-php/database": "0.30.*" }, "require-dev": { + "laravel/pint": "1.2.*", + "phpstan/phpstan": "1.9.x-dev", "phpunit/phpunit": "^9.4", "vimeo/psalm": "4.0.1" }, @@ -1171,12 +1173,6 @@ "license": [ "MIT" ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], "description": "A simple abuse library to manage application usage limits", "keywords": [ "Abuse", @@ -1187,9 +1183,9 @@ ], "support": { "issues": "https://github.com/utopia-php/abuse/issues", - "source": "https://github.com/utopia-php/abuse/tree/0.16.0" + "source": "https://github.com/utopia-php/abuse/tree/0.18.0" }, - "time": "2022-10-31T14:46:41+00:00" + "time": "2023-02-14T09:56:04+00:00" }, { "name": "utopia-php/analytics", @@ -1248,24 +1244,26 @@ }, { "name": "utopia-php/audit", - "version": "0.17.0", + "version": "0.20.0", "source": { "type": "git", "url": "https://github.com/utopia-php/audit.git", - "reference": "455471bd4de8d74026809e843f8c9740eb32922c" + "reference": "3fce3f4ad3ea9dfcb39b79668abd76331412a5ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/audit/zipball/455471bd4de8d74026809e843f8c9740eb32922c", - "reference": "455471bd4de8d74026809e843f8c9740eb32922c", + "url": "https://api.github.com/repos/utopia-php/audit/zipball/3fce3f4ad3ea9dfcb39b79668abd76331412a5ed", + "reference": "3fce3f4ad3ea9dfcb39b79668abd76331412a5ed", "shasum": "" }, "require": { "ext-pdo": "*", "php": ">=8.0", - "utopia-php/database": "0.28.*" + "utopia-php/database": "0.30.*" }, "require-dev": { + "laravel/pint": "1.2.*", + "phpstan/phpstan": "^1.8", "phpunit/phpunit": "^9.3", "vimeo/psalm": "4.0.1" }, @@ -1289,9 +1287,9 @@ ], "support": { "issues": "https://github.com/utopia-php/audit/issues", - "source": "https://github.com/utopia-php/audit/tree/0.17.0" + "source": "https://github.com/utopia-php/audit/tree/0.20.0" }, - "time": "2022-10-31T14:44:52+00:00" + "time": "2023-02-14T09:46:54+00:00" }, { "name": "utopia-php/cache", @@ -1448,20 +1446,19 @@ }, { "name": "utopia-php/database", - "version": "dev-increment", + "version": "0.30.1", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "e548c4b5c6f1d7cfc9ba0113fbeb8c4684eddcd2" + "reference": "1cea72c1217357bf0747ae4f28ebef57e9dc0e65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/e548c4b5c6f1d7cfc9ba0113fbeb8c4684eddcd2", - "reference": "e548c4b5c6f1d7cfc9ba0113fbeb8c4684eddcd2", + "url": "https://api.github.com/repos/utopia-php/database/zipball/1cea72c1217357bf0747ae4f28ebef57e9dc0e65", + "reference": "1cea72c1217357bf0747ae4f28ebef57e9dc0e65", "shasum": "" }, "require": { - "ext-pdo": "*", "php": ">=8.0", "utopia-php/cache": "0.8.*", "utopia-php/framework": "0.*.*", @@ -1497,9 +1494,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/increment" + "source": "https://github.com/utopia-php/database/tree/0.30.1" }, - "time": "2023-02-05T10:33:42+00:00" + "time": "2023-02-14T06:25:03+00:00" }, { "name": "utopia-php/domains", @@ -1751,22 +1748,23 @@ }, { "name": "utopia-php/logger", - "version": "0.3.0", + "version": "0.3.1", "source": { "type": "git", "url": "https://github.com/utopia-php/logger.git", - "reference": "079656cb5169ca9600861eda0b6819199e3d4a57" + "reference": "de623f1ec1c672c795d113dd25c5bf212f7ef4fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/logger/zipball/079656cb5169ca9600861eda0b6819199e3d4a57", - "reference": "079656cb5169ca9600861eda0b6819199e3d4a57", + "url": "https://api.github.com/repos/utopia-php/logger/zipball/de623f1ec1c672c795d113dd25c5bf212f7ef4fc", + "reference": "de623f1ec1c672c795d113dd25c5bf212f7ef4fc", "shasum": "" }, "require": { "php": ">=8.0" }, "require-dev": { + "phpstan/phpstan": "1.9.x-dev", "phpunit/phpunit": "^9.3", "vimeo/psalm": "4.0.1" }, @@ -1780,20 +1778,6 @@ "license": [ "MIT" ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - }, - { - "name": "Matej Bačo", - "email": "matej@appwrite.io" - }, - { - "name": "Christy Jacob", - "email": "christy@appwrite.io" - } - ], "description": "Utopia Logger library is simple and lite library for logging information, such as errors or warnings. This library is aiming to be as simple and easy to learn and use.", "keywords": [ "appsignal", @@ -1811,22 +1795,22 @@ ], "support": { "issues": "https://github.com/utopia-php/logger/issues", - "source": "https://github.com/utopia-php/logger/tree/0.3.0" + "source": "https://github.com/utopia-php/logger/tree/0.3.1" }, - "time": "2022-03-18T10:56:57+00:00" + "time": "2023-02-10T15:52:50+00:00" }, { "name": "utopia-php/messaging", - "version": "0.1.0", + "version": "0.1.1", "source": { "type": "git", "url": "https://github.com/utopia-php/messaging.git", - "reference": "501272fad666f06bec8f130076862e7981a73f8c" + "reference": "a75d66ddd59b834ab500a4878a2c084e6572604a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/messaging/zipball/501272fad666f06bec8f130076862e7981a73f8c", - "reference": "501272fad666f06bec8f130076862e7981a73f8c", + "url": "https://api.github.com/repos/utopia-php/messaging/zipball/a75d66ddd59b834ab500a4878a2c084e6572604a", + "reference": "a75d66ddd59b834ab500a4878a2c084e6572604a", "shasum": "" }, "require": { @@ -1834,9 +1818,9 @@ "php": ">=8.0.0" }, "require-dev": { + "laravel/pint": "^1.2", "phpmailer/phpmailer": "6.6.*", - "phpunit/phpunit": "9.5.*", - "squizlabs/php_codesniffer": "^3.6" + "phpunit/phpunit": "9.5.*" }, "type": "library", "autoload": { @@ -1848,12 +1832,6 @@ "license": [ "MIT" ], - "authors": [ - { - "name": "Jake Barnby", - "email": "jake@appwrite.io" - } - ], "description": "A simple, light and advanced PHP messaging library", "keywords": [ "library", @@ -1865,9 +1843,9 @@ ], "support": { "issues": "https://github.com/utopia-php/messaging/issues", - "source": "https://github.com/utopia-php/messaging/tree/0.1.0" + "source": "https://github.com/utopia-php/messaging/tree/0.1.1" }, - "time": "2022-09-29T11:22:48+00:00" + "time": "2023-02-07T05:42:46+00:00" }, { "name": "utopia-php/mongo", @@ -4977,16 +4955,16 @@ }, { "name": "twig/twig", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72" + "reference": "a6e0510cc793912b451fd40ab983a1d28f611c15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/3ffcf4b7d890770466da3b2666f82ac054e7ec72", - "reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/a6e0510cc793912b451fd40ab983a1d28f611c15", + "reference": "a6e0510cc793912b451fd40ab983a1d28f611c15", "shasum": "" }, "require": { @@ -5037,7 +5015,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.5.0" + "source": "https://github.com/twigphp/Twig/tree/v3.5.1" }, "funding": [ { @@ -5049,21 +5027,12 @@ "type": "tidelift" } ], - "time": "2022-12-27T12:28:18+00:00" - } - ], - "aliases": [ - { - "package": "utopia-php/database", - "version": "dev-increment", - "alias": "0.28.0", - "alias_normalized": "0.28.0.0" + "time": "2023-02-08T07:49:20+00:00" } ], + "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "utopia-php/database": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From acbf676d94c608e46f9507ceca110d6f20ac9127 Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 14 Feb 2023 19:40:21 +0200 Subject: [PATCH 87/94] test fix --- tests/e2e/General/UsageTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index a8598d01c..99f7ddbaa 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -297,7 +297,7 @@ class UsageTest extends Scope ); $res = $res['body']; - $this->assertEquals($storageTotal, $res['filesStorage'][array_key_last($res['filesTotal'])]['value']); + $this->assertEquals($storageTotal, $res['filesStorage'][array_key_last($res['filesStorage'])]['value']); $this->validateDates($res['filesStorage']); $this->assertEquals($bucketsTotal, $res['bucketsTotal'][array_key_last($res['bucketsTotal'])]['value']); $this->validateDates($res['bucketsTotal']); From 1b3da3cc3aa127eafb18730c1adf0c733f32a271 Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 14 Feb 2023 20:06:21 +0200 Subject: [PATCH 88/94] test fix --- src/Appwrite/Utopia/Response/Model/UsageStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Response/Model/UsageStorage.php b/src/Appwrite/Utopia/Response/Model/UsageStorage.php index 30e181e7c..88d0beca0 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageStorage.php +++ b/src/Appwrite/Utopia/Response/Model/UsageStorage.php @@ -30,7 +30,7 @@ class UsageStorage extends Model 'example' => [], 'array' => true ]) - ->addRule('storage', [ + ->addRule('filesStorage', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated stats for the occupied storage size (in bytes).', 'default' => [], From 074d7dad321ee288df9321aec878b05dea79d4cd Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 14 Feb 2023 21:07:13 +0200 Subject: [PATCH 89/94] test fix --- app/config/specs/open-api3-latest-console.json | 2 +- app/config/specs/swagger2-latest-console.json | 2 +- app/workers/audits.php | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index ddd8575cc..fdd388ac1 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":"1.1.2","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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"get","weight":19,"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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"create","weight":7,"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 `ID.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"]}}}}}},"\/account\/email":{"patch":{"summary":"Update 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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateEmail","weight":26,"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\/invite":{"post":{"summary":"Create account using an invite code","operationId":"accountCreateWithInviteCode","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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"createWithInviteCode","weight":6,"cookies":false,"type":"","demo":"account\/create-with-invite-code.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":["console"],"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 `ID.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]"},"code":{"type":"string","description":"An invite code to restrict user signups on the Appwrite console. Users with an invite code will be able to create accounts irrespective of email and IP whitelists.","x-example":"[CODE]"}},"required":["userId","email","password"]}}}}}},"\/account\/jwt":{"post":{"summary":"Create 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":18,"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":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","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":"listLogs","weight":22,"cookies":false,"type":"","demo":"account\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateName","weight":24,"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 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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePassword","weight":25,"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\/phone":{"patch":{"summary":"Update Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.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":{"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["phone","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":20,"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 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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePrefs","weight":28,"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":33,"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":34,"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":"List Sessions","operationId":"accountListSessions","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":"listSessions","weight":21,"cookies":false,"type":"","demo":"account\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":[]}]},"delete":{"summary":"Delete 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":32,"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":17,"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\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","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":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.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"]}}}}}},"\/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. If the provided user ID has not be registered, a new user will be created. 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":13,"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 `ID.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":14,"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 OAuth2 Session","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":9,"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, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","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. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","tags":["account"],"description":"Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-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 `ID.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]"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"}},"required":["userId","phone"]}}}}},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":16,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-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\/{sessionId}":{"get":{"summary":"Get Session","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":23,"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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":31,"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 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":30,"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\/status":{"patch":{"summary":"Update Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateStatus","weight":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.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\/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#accountUpdateEmailVerification). 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":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-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":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-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"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number 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":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":40,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":39,"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":43,"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. Country codes follow the [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":41,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":42,"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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":45,"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":"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.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":44,"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 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","tags":["databases"],"description":"Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.","responses":{"200":{"description":"Databases List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/databaseList"}}}}},"x-appwrite":{"method":"list","weight":47,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","tags":["databases"],"description":"Create a new Database.\n","responses":{"201":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"create","weight":46,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"databaseId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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":"[DATABASE_ID]","x-global":true},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["databaseId","name"]}}}}}},"\/databases\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabases"}}}}},"x-appwrite":{"method":"getUsage","weight":80,"cookies":false,"type":"","demo":"databases\/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"}]}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","tags":["databases"],"description":"Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.","responses":{"200":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"get","weight":48,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","tags":["databases"],"description":"Update a database by its unique ID.","responses":{"200":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"update","weight":50,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Database","operationId":"databasesDelete","tags":["databases"],"description":"Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":51,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","tags":["databases"],"description":"Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"listCollections","weight":53,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","tags":["databases"],"description":"Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"createCollection","weight":52,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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]"},"permissions":{"type":"array","description":"An array of permissions strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","x-example":false}},"required":["collectionId","name"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","tags":["databases"],"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":54,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","tags":["databases"],"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":56,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permission are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","x-example":false}},"required":["name"]}}}}},"delete":{"summary":"Delete Collection","operationId":"databasesDeleteCollection","tags":["databases"],"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":57,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":67,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","tags":["databases"],"description":"Create a boolean attribute.\n","responses":{"202":{"description":"AttributeBoolean","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"createBooleanAttribute","weight":65,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":66,"cookies":false,"type":"","demo":"databases\/create-datetime-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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 the attribute in ISO 8601 format. Cannot be set when attribute is required.","x-example":"2020-10-15T06:38:00.000+00:00"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","tags":["databases"],"description":"Create an email attribute.\n","responses":{"202":{"description":"AttributeEmail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"createEmailAttribute","weight":59,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":60,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 elements are allowed, each 4096 characters long.","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","tags":["databases"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeFloat","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"createFloatAttribute","weight":64,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","tags":["databases"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeInteger","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"createIntegerAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","tags":["databases"],"description":"Create IP address attribute.\n","responses":{"202":{"description":"AttributeIP","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"createIpAttribute","weight":61,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","tags":["databases"],"description":"Create a string attribute.\n","responses":{"202":{"description":"AttributeString","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"createStringAttribute","weight":58,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","tags":["databases"],"description":"Create a URL attribute.\n","responses":{"202":{"description":"AttributeURL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"createUrlAttribute","weight":62,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime, or AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeString","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/attributeDatetime"},{"$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\/attributeDatetime"},{"$ref":"#\/components\/schemas\/attributeString"}]}}}}},"x-appwrite":{"method":"getAttribute","weight":68,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteAttribute","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":69,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","tags":["databases"],"description":"Get a list of all the user's documents in a given collection. You can use the query params to filter your results.","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":75,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","tags":["databases"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":74,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 `ID.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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","tags":["databases"],"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":76,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesUpdateDocument","tags":["databases"],"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":78,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","tags":["databases"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":79,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databasesListDocumentLogs","tags":["databases"],"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":77,"cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":71,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","tags":["databases"],"description":"","responses":{"202":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":70,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 attributes are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","tags":["databases"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":72,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteIndex","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":73,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListCollectionLogs","tags":["databases"],"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":55,"cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageCollection"}}}}},"x-appwrite":{"method":"getCollectionUsage","weight":82,"cookies":false,"type":"","demo":"databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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"}]}},"\/databases\/{databaseId}\/logs":{"get":{"summary":"List Database Logs","operationId":"databasesListLogs","tags":["databases"],"description":"Get the database activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":49,"cookies":false,"type":"","demo":"databases\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabase"}}}}},"x-appwrite":{"method":"getDatabaseUsage","weight":81,"cookies":false,"type":"","demo":"databases\/get-database-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"range","description":"`Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/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":191,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":190,"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 `ID.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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","x-example":false}},"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":192,"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\/usage":{"get":{"summary":"Get Functions Usage","operationId":"functionsGetUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getUsage","weight":195,"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":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/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":193,"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":196,"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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","x-example":"[\"any\"]","items":{"type":"string"}},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","x-example":false}},"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":198,"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":200,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: entrypoint, size, buildId, activate","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":{"202":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":199,"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":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"getDeployment","weight":201,"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":197,"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":202,"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":"Create Build","operationId":"functionsCreateBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":203,"cookies":false,"type":"","demo":"functions\/create-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.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"},{"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.","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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, statusCode, duration","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":"ip:{ip},userId:{userId}","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 in the background. Default value is false.","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":"functionsGetFunctionUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getFunctionUsage","weight":194,"cookies":false,"type":"","demo":"functions\/get-function-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"}]}},"\/functions\/{functionId}\/variables":{"get":{"summary":"List Variables","operationId":"functionsListVariables","tags":["functions"],"description":"Get a list of all variables of a specific function.","responses":{"200":{"description":"Variables List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variableList"}}}}},"x-appwrite":{"method":"listVariables","weight":208,"cookies":false,"type":"","demo":"functions\/list-variables.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-variables.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"post":{"summary":"Create Variable","operationId":"functionsCreateVariable","tags":["functions"],"description":"Create a new function variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"createVariable","weight":207,"cookies":false,"type":"","demo":"functions\/create-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","x-example":"[VALUE]"}},"required":["key","value"]}}}}}},"\/functions\/{functionId}\/variables\/{variableId}":{"get":{"summary":"Get Variable","operationId":"functionsGetVariable","tags":["functions"],"description":"Get a variable by its unique ID.","responses":{"200":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"getVariable","weight":209,"cookies":false,"type":"","demo":"functions\/get-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_ID]"},"in":"path"}]},"put":{"summary":"Update Variable","operationId":"functionsUpdateVariable","tags":["functions"],"description":"Update variable by its unique ID.","responses":{"200":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"updateVariable","weight":210,"cookies":false,"type":"","demo":"functions\/update-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","x-example":"[VALUE]"}},"required":["key"]}}}}},"delete":{"summary":"Delete Variable","operationId":"functionsDeleteVariable","tags":["functions"],"description":"Delete a variable by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteVariable","weight":211,"cookies":false,"type":"","demo":"functions\/delete-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_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":90,"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":102,"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 servers are up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getCache","weight":93,"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 servers are up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getDB","weight":92,"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\/pubsub":{"get":{"summary":"Get PubSub","operationId":"healthGetPubSub","tags":["health"],"description":"Check the Appwrite pub-sub servers are up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getPubSub","weight":95,"cookies":false,"type":"","demo":"health\/get-pub-sub.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.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":{"get":{"summary":"Get Queue","operationId":"healthGetQueue","tags":["health"],"description":"Check the Appwrite queue messaging servers are up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getQueue","weight":94,"cookies":false,"type":"","demo":"health\/get-queue.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.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":99,"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":100,"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":98,"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\/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":97,"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":101,"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":96,"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":83,"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":"localeListContinents","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":"listContinents","weight":87,"cookies":false,"type":"","demo":"locale\/list-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountries","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":"listCountries","weight":84,"cookies":false,"type":"","demo":"locale\/list-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesEU","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":"listCountriesEU","weight":85,"cookies":false,"type":"","demo":"locale\/list-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesPhones","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":"listCountriesPhones","weight":86,"cookies":false,"type":"","demo":"locale\/list-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCurrencies","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":"listCurrencies","weight":88,"cookies":false,"type":"","demo":"locale\/list-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListLanguages","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":"listLanguages","weight":89,"cookies":false,"type":"","demo":"locale\/list-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":[]}]}},"\/project\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectGetUsage","tags":["project"],"description":"","responses":{"200":{"description":"UsageProject","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageProject"}}}}},"x-appwrite":{"method":"getUsage","weight":135,"cookies":false,"type":"","demo":"project\/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":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/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":105,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":104,"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 `ID.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]"},"region":{"type":"string","description":"Project Region.","x-example":"default"},"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":106,"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":107,"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":113,"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\/duration":{"patch":{"summary":"Update Project Authentication Duration","operationId":"projectsUpdateAuthDuration","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthDuration","weight":111,"cookies":false,"type":"","demo":"projects\/update-auth-duration.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":{"duration":{"type":"integer","description":"Project session length in seconds. Max length: 31536000 seconds.","x-example":0}},"required":["duration"]}}}}}},"\/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":110,"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":112,"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":131,"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":130,"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":132,"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":134,"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":133,"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":121,"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":120,"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. Maximum of 100 scopes are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","x-example":"2020-10-15T06:38:00.000+00:00"}},"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":122,"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":123,"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. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["name","scopes"]}}}}},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":124,"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":109,"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]"},"enabled":{"type":"boolean","description":"Provider status. Set to 'false' to disable new session creation.","x-example":false}},"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":126,"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":125,"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":null}},"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":127,"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":128,"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":null}},"required":["name"]}}}}},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":129,"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":108,"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}\/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":115,"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":114,"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. Maximum of 100 events are allowed.","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":116,"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":117,"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. Maximum of 100 events are allowed.","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":119,"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"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhookSignature","weight":118,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.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":137,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":136,"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 `ID.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]"},"permissions":{"type":"array","description":"An array of permission strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","x-example":"none"},"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"]}}}}}},"\/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":138,"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":139,"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","x-example":"none"},"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"]}}}}},"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":140,"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.","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":142,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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\/storage#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":141,"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":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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 `ID.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},"permissions":{"type":"array","description":"An array of permission strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","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":143,"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":147,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":{"permissions":{"type":"array","description":"An array of permission string. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","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":148,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":145,"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":144,"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":146,"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":150,"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 storage bucket","operationId":"storageGetBucketUsage","tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageBuckets"}}}}},"x-appwrite":{"method":"getBucketUsage","weight":149,"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.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":152,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":151,"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 `ID.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). Maximum of 100 roles are allowed, each 32 characters long.","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":153,"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":154,"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":155,"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}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":162,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"List Team Memberships","operationId":"teamsListMemberships","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":"listMemberships","weight":157,"cookies":false,"type":"","demo":"teams\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":156,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","weight":158,"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":159,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":161,"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":160,"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":171,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":163,"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 `ID.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"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"},"password":{"type":"string","description":"Plain text 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"]}}}}}},"\/users\/argon2":{"post":{"summary":"Create User with Argon2 Password","operationId":"usersCreateArgon2User","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createArgon2User","weight":166,"cookies":false,"type":"","demo":"users\/create-argon2user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-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 `ID.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 hashed using Argon2.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/bcrypt":{"post":{"summary":"Create User with Bcrypt Password","operationId":"usersCreateBcryptUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createBcryptUser","weight":164,"cookies":false,"type":"","demo":"users\/create-bcrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-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 `ID.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 hashed using Bcrypt.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/md5":{"post":{"summary":"Create User with MD5 Password","operationId":"usersCreateMD5User","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createMD5User","weight":165,"cookies":false,"type":"","demo":"users\/create-m-d5user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-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 `ID.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 hashed using MD5.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/phpass":{"post":{"summary":"Create User with PHPass Password","operationId":"usersCreatePHPassUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createPHPassUser","weight":168,"cookies":false,"type":"","demo":"users\/create-p-h-pass-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-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 `ID.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 hashed using PHPass.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/scrypt":{"post":{"summary":"Create User with Scrypt Password","operationId":"usersCreateScryptUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createScryptUser","weight":169,"cookies":false,"type":"","demo":"users\/create-scrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-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 `ID.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 hashed using Scrypt.","x-example":"password"},"passwordSalt":{"type":"string","description":"Optional salt used to hash password.","x-example":"[PASSWORD_SALT]"},"passwordCpu":{"type":"integer","description":"Optional CPU cost used to hash password.","x-example":null},"passwordMemory":{"type":"integer","description":"Optional memory cost used to hash password.","x-example":null},"passwordParallel":{"type":"integer","description":"Optional parallelization cost used to hash password.","x-example":null},"passwordLength":{"type":"integer","description":"Optional hash length used to hash password.","x-example":null},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordCpu","passwordMemory","passwordParallel","passwordLength"]}}}}}},"\/users\/scrypt-modified":{"post":{"summary":"Create User with Scrypt Modified Password","operationId":"usersCreateScryptModifiedUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createScryptModifiedUser","weight":170,"cookies":false,"type":"","demo":"users\/create-scrypt-modified-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-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 `ID.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 hashed using Scrypt Modified.","x-example":"password"},"passwordSalt":{"type":"string","description":"Salt used to hash password.","x-example":"[PASSWORD_SALT]"},"passwordSaltSeparator":{"type":"string","description":"Salt separator used to hash password.","x-example":"[PASSWORD_SALT_SEPARATOR]"},"passwordSignerKey":{"type":"string","description":"Signer key used to hash password.","x-example":"[PASSWORD_SIGNER_KEY]"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordSaltSeparator","passwordSignerKey"]}}}}}},"\/users\/sha":{"post":{"summary":"Create User with SHA Password","operationId":"usersCreateSHAUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createSHAUser","weight":167,"cookies":false,"type":"","demo":"users\/create-s-h-a-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-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 `ID.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 hashed using SHA.","x-example":"password"},"passwordVersion":{"type":"string","description":"Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'","x-example":"sha1"},"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":189,"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"}]}},"\/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":172,"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, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":188,"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":182,"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":"List User Logs","operationId":"usersListLogs","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":"listLogs","weight":176,"cookies":false,"type":"","demo":"users\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"List User Memberships","operationId":"usersListMemberships","tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"listMemberships","weight":175,"cookies":false,"type":"","demo":"users\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.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"}]}},"\/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":180,"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":181,"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}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":183,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.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":{"number":{"type":"string","description":"User phone number.","x-example":"+12065550100"}},"required":["number"]}}}}}},"\/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":173,"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":185,"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":"List User Sessions","operationId":"usersListSessions","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":"listSessions","weight":174,"cookies":false,"type":"","demo":"users\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":187,"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":186,"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. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":177,"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":"usersUpdateEmailVerification","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":"updateEmailVerification","weight":184,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-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"]}}}}}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":179,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-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":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","x-example":false}},"required":["phoneVerification"]}}}}}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","x-globalAttributes":[]},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.","x-globalAttributes":[]},{"name":"databases","description":"The Databases service allows you to create structured collections of documents, query and filter lists of documents","x-globalAttributes":["databaseId"]},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location.","x-globalAttributes":[]},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health.","x-globalAttributes":[]},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"project","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"storage","description":"The Storage service allows you to manage your project files.","x-globalAttributes":[]},{"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","x-globalAttributes":[]},{"name":"users","description":"The Users service allows you to manage your project users.","x-globalAttributes":[]},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions.","x-globalAttributes":[]}],"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"]},"databaseList":{"description":"Databases List","type":"object","properties":{"total":{"type":"integer","description":"Total number of databases documents that matched your query.","x-example":5,"format":"int32"},"databases":{"type":"array","description":"List of databases.","items":{"$ref":"#\/components\/schemas\/database"},"x-example":""}},"required":["total","databases"]},"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"]},"variableList":{"description":"Variables List","type":"object","properties":{"total":{"type":"integer","description":"Total number of variables documents that matched your query.","x-example":5,"format":"int32"},"variables":{"type":"array","description":"List of variables.","items":{"$ref":"#\/components\/schemas\/variable"},"x-example":""}},"required":["total","variables"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"},"$createdAt":{"type":"string","description":"Database creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Database update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","name","$createdAt","$updatedAt"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Collection creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Collection update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Collection permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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\/attributeDatetime"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$permissions","databaseId","name","enabled","documentSecurity","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\/attributeDatetime"},{"$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"]},"attributeDatetime":{"description":"AttributeDatetime","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"birthDay"},"type":{"type":"string","description":"Attribute type.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"ISO 8601 format.","x-example":"datetime"},"default":{"type":"string","description":"Default value for attribute when not provided. Only null is optional","x-example":"2020-10-15T06:38:00.000+00:00","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":[],"nullable":true}},"required":["key","type","status","attributes"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collectionId":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"string","description":"Document creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Document update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Document permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]}},"additionalProperties":true,"required":["$id","$collectionId","$databaseId","$createdAt","$updatedAt","$permissions"]},"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":"string","description":"Log creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"password":{"type":"string","description":"Hashed user password.","x-example":"$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE"},"hash":{"type":"string","description":"Password hashing algorithm.","x-example":"argon2"},"hashOptions":{"type":"object","description":"Password hashing algorithm configuration.","x-example":{},"items":{"oneOf":[{"$ref":"#\/components\/schemas\/algoArgon2"},{"$ref":"#\/components\/schemas\/algoScrypt"},{"$ref":"#\/components\/schemas\/algoScryptModified"},{"$ref":"#\/components\/schemas\/algoBcrypt"},{"$ref":"#\/components\/schemas\/algoPhpass"},{"$ref":"#\/components\/schemas\/algoSha"},{"$ref":"#\/components\/schemas\/algoMd5"}]}},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","password","hash","hashOptions","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"algoMd5":{"description":"AlgoMD5","type":"object"},"algoSha":{"description":"AlgoSHA","type":"object"},"algoPhpass":{"description":"AlgoPHPass","type":"object"},"algoBcrypt":{"description":"AlgoBcrypt","type":"object"},"algoScrypt":{"description":"AlgoScrypt","type":"object","properties":{"costCpu":{"type":"integer","description":"CPU complexity of computed hash.","x-example":8,"format":"int32"},"costMemory":{"type":"integer","description":"Memory complexity of computed hash.","x-example":14,"format":"int32"},"costParallel":{"type":"integer","description":"Parallelization of computed hash.","x-example":1,"format":"int32"},"length":{"type":"integer","description":"Length used to compute hash.","x-example":64,"format":"int32"}},"required":["costCpu","costMemory","costParallel","length"]},"algoScryptModified":{"description":"AlgoScryptModified","type":"object","properties":{"salt":{"type":"string","description":"Salt used to compute hash.","x-example":"UxLMreBr6tYyjQ=="},"saltSeparator":{"type":"string","description":"Separator used to compute hash.","x-example":"Bw=="},"signerKey":{"type":"string","description":"Key used to compute hash.","x-example":"XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ=="}},"required":["salt","saltSeparator","signerKey"]},"algoArgon2":{"description":"AlgoArgon2","type":"object","properties":{"memoryCost":{"type":"integer","description":"Memory used to compute hash.","x-example":65536,"format":"int32"},"timeCost":{"type":"integer","description":"Amount of time consumed to compute hash","x-example":4,"format":"int32"},"threads":{"type":"integer","description":"Number of threads used to compute hash.","x-example":3,"format":"int32"}},"required":["memoryCost","timeCost","threads"]},"account":{"description":"Account","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Session creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"string","description":"Session expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"The date of when the access token expires in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","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"},"$createdAt":{"type":"string","description":"Token creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"Token expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","$createdAt","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"},"$createdAt":{"type":"string","description":"File creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"File update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"File permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"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","$createdAt","$updatedAt","$permissions","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Bucket creation time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Bucket update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Bucket permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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"]},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).","x-example":"gzip"},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$createdAt","$updatedAt","$permissions","fileSecurity","name","enabled","maximumFileSize","allowedFileExtensions","compression","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Team creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Team update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Membership creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Membership update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"string","description":"Date, the user has been invited to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"joined":{"type":"string","description":"Date, the user has accepted the invitation to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Function creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Function update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"users"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"enabled":{"type":"boolean","description":"Function enabled.","x-example":false},"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":"array","description":"Function variables.","items":{"$ref":"#\/components\/schemas\/variable"},"x-example":[]},"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 * * *"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","runtime","deployment","vars","events","schedule","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"},"$createdAt":{"type":"string","description":"Deployment creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Deployment update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Execution creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Execution upate date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Execution roles.","items":{"type":"string"},"x-example":["any"]},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"duration":{"type":"number","description":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Project creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Project update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"authDuration":{"type":"integer","description":"Session duration in seconds.","x-example":60,"format":"int32"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"providers":{"type":"array","description":"List of Providers.","items":{"$ref":"#\/components\/schemas\/provider"},"x-example":{}},"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":{}},"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},"serviceStatusForDatabases":{"type":"boolean","description":"Databases 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","$createdAt","$updatedAt","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authDuration","authLimit","providers","platforms","webhooks","keys","domains","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Webhook creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Webhook update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"signatureKey":{"type":"string","description":"Signature key which can be used to validated incoming","x-example":"ad3d581ca230e2b7059c545e5a"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Key creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Key update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"expire":{"type":"string","description":"Key expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"},"accessedAt":{"type":"string","description":"Most recent access date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"sdks":{"type":"array","description":"List of SDK user agents that used this key.","items":{"type":"string"},"x-example":"appwrite:flutter"}},"required":["$id","$createdAt","$updatedAt","name","expire","scopes","secret","accessedAt","sdks"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Domain creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Domain update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"provider":{"description":"Provider","type":"object","properties":{"name":{"type":"string","description":"Provider name.","x-example":"GitHub"},"appId":{"type":"string","description":"OAuth 2.0 application ID.","x-example":"259125845563242502"},"secret":{"type":"string","description":"OAuth 2.0 application secret. Might be JSON string if provider requires extra configuration.","x-example":"Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ"},"enabled":{"type":"boolean","description":"Provider is active and can be used to create session.","x-example":""}},"required":["name","appId","secret","enabled"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Platform creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Platform update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","name","type","key","store","hostname","httpUser","httpPass"]},"variable":{"description":"Variable","type":"object","properties":{"$id":{"type":"string","description":"Variable ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"key":{"type":"string","description":"Variable key.","x-example":"API_KEY"},"value":{"type":"string","description":"Variable value.","x-example":"myPa$$word1"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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":{"name":{"type":"string","description":"Name of the service.","x-example":"database"},"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":["name","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"]},"metric":{"description":"Metric","type":"object","properties":{"value":{"type":"integer","description":"The value of this metric at the timestamp.","x-example":1,"format":"int32"},"date":{"type":"string","description":"The date at which this metric was aggregated in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["value","date"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","databasesTotal","collectionsTotal","documentsTotal"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","collectionsTotal","documentsTotal"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","documentsTotal"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersTotal":{"type":"array","description":"Aggregated stats for total number of users.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"sessionsTotal":{"type":"array","description":"Aggregated stats for sessions created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","usersTotal","sessionsTotal"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"bucketsTotal":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","bucketsTotal","filesTotal","storage"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","filesTotal","filesStorage"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsTotal":{"type":"array","description":"Aggregated stats for number of functions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"deploymentsTotal":{"type":"array","description":"Aggregated stats for number of function deployments.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"deploymentsStorage":{"type":"array","description":"Aggregated stats for function deployments storage.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsTotal":{"type":"array","description":"Aggregated stats for number of function builds.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsStorage":{"type":"array","description":"Aggregated stats for builds storage.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsTime":{"type":"array","description":"Aggregated stats for function build compute.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for number of function executions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsTime":{"type":"array","description":"Aggregated stats for function execution compute.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","functionsTotal","deploymentsTotal","deploymentsStorage","buildsTotal","buildsStorage","buildsTime","executionsTotal","executionsTime"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requestsTotal":{"type":"array","description":"Aggregated stats for number of requests.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databasesTotal":{"type":"array","description":"Aggregated stats for number of databases.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"usersTotal":{"type":"array","description":"Aggregated stats for number of users.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsTotal":{"type":"array","description":"Aggregated stats for number of buckets.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","requestsTotal","network","executionsTotal","documentsTotal","databasesTotal","usersTotal","filesStorage","bucketsTotal"]}},"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":"1.1.2","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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"get","weight":19,"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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"create","weight":7,"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 `ID.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"]}}}}}},"\/account\/email":{"patch":{"summary":"Update 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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateEmail","weight":26,"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\/invite":{"post":{"summary":"Create account using an invite code","operationId":"accountCreateWithInviteCode","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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"createWithInviteCode","weight":6,"cookies":false,"type":"","demo":"account\/create-with-invite-code.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":["console"],"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 `ID.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]"},"code":{"type":"string","description":"An invite code to restrict user signups on the Appwrite console. Users with an invite code will be able to create accounts irrespective of email and IP whitelists.","x-example":"[CODE]"}},"required":["userId","email","password"]}}}}}},"\/account\/jwt":{"post":{"summary":"Create 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":18,"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":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","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":"listLogs","weight":22,"cookies":false,"type":"","demo":"account\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateName","weight":24,"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 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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePassword","weight":25,"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\/phone":{"patch":{"summary":"Update Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.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":{"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["phone","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":20,"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 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":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updatePrefs","weight":28,"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":33,"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":34,"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":"List Sessions","operationId":"accountListSessions","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":"listSessions","weight":21,"cookies":false,"type":"","demo":"account\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":[]}]},"delete":{"summary":"Delete 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":32,"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":17,"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\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","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":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.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"]}}}}}},"\/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. If the provided user ID has not be registered, a new user will be created. 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":13,"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 `ID.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":14,"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 OAuth2 Session","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":9,"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, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","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. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","tags":["account"],"description":"Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-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 `ID.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]"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"}},"required":["userId","phone"]}}}}},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":16,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-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\/{sessionId}":{"get":{"summary":"Get Session","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":23,"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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":31,"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 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":30,"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\/status":{"patch":{"summary":"Update Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"Account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/account"}}}}},"x-appwrite":{"method":"updateStatus","weight":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.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\/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#accountUpdateEmailVerification). 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":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-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":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-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"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number 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":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":40,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":39,"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":43,"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. Country codes follow the [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":41,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":42,"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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":45,"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":"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.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":44,"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 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","tags":["databases"],"description":"Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.","responses":{"200":{"description":"Databases List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/databaseList"}}}}},"x-appwrite":{"method":"list","weight":47,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","tags":["databases"],"description":"Create a new Database.\n","responses":{"201":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"create","weight":46,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"databaseId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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":"[DATABASE_ID]","x-global":true},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["databaseId","name"]}}}}}},"\/databases\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabases"}}}}},"x-appwrite":{"method":"getUsage","weight":80,"cookies":false,"type":"","demo":"databases\/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"}]}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","tags":["databases"],"description":"Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.","responses":{"200":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"get","weight":48,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","tags":["databases"],"description":"Update a database by its unique ID.","responses":{"200":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"update","weight":50,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Database","operationId":"databasesDelete","tags":["databases"],"description":"Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":51,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","tags":["databases"],"description":"Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"listCollections","weight":53,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","tags":["databases"],"description":"Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"createCollection","weight":52,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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]"},"permissions":{"type":"array","description":"An array of permissions strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","x-example":false}},"required":["collectionId","name"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","tags":["databases"],"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":54,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","tags":["databases"],"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":56,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permission are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","x-example":false}},"required":["name"]}}}}},"delete":{"summary":"Delete Collection","operationId":"databasesDeleteCollection","tags":["databases"],"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":57,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":67,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","tags":["databases"],"description":"Create a boolean attribute.\n","responses":{"202":{"description":"AttributeBoolean","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"createBooleanAttribute","weight":65,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeDatetime"}}}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":66,"cookies":false,"type":"","demo":"databases\/create-datetime-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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 the attribute in ISO 8601 format. Cannot be set when attribute is required.","x-example":"2020-10-15T06:38:00.000+00:00"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","tags":["databases"],"description":"Create an email attribute.\n","responses":{"202":{"description":"AttributeEmail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"createEmailAttribute","weight":59,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":60,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 elements are allowed, each 4096 characters long.","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","tags":["databases"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeFloat","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"createFloatAttribute","weight":64,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","tags":["databases"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeInteger","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"createIntegerAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","tags":["databases"],"description":"Create IP address attribute.\n","responses":{"202":{"description":"AttributeIP","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"createIpAttribute","weight":61,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","tags":["databases"],"description":"Create a string attribute.\n","responses":{"202":{"description":"AttributeString","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"createStringAttribute","weight":58,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","tags":["databases"],"description":"Create a URL attribute.\n","responses":{"202":{"description":"AttributeURL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"createUrlAttribute","weight":62,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime, or AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeString","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/attributeDatetime"},{"$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\/attributeDatetime"},{"$ref":"#\/components\/schemas\/attributeString"}]}}}}},"x-appwrite":{"method":"getAttribute","weight":68,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteAttribute","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":69,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","tags":["databases"],"description":"Get a list of all the user's documents in a given collection. You can use the query params to filter your results.","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":75,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","tags":["databases"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":74,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 `ID.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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","tags":["databases"],"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":76,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesUpdateDocument","tags":["databases"],"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":78,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","tags":["databases"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":79,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databasesListDocumentLogs","tags":["databases"],"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":77,"cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":71,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","tags":["databases"],"description":"","responses":{"202":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":70,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 attributes are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","tags":["databases"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":72,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteIndex","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":73,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListCollectionLogs","tags":["databases"],"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":55,"cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageCollection"}}}}},"x-appwrite":{"method":"getCollectionUsage","weight":82,"cookies":false,"type":"","demo":"databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"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"}]}},"\/databases\/{databaseId}\/logs":{"get":{"summary":"List Database Logs","operationId":"databasesListLogs","tags":["databases"],"description":"Get the database activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":49,"cookies":false,"type":"","demo":"databases\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabase"}}}}},"x-appwrite":{"method":"getDatabaseUsage","weight":81,"cookies":false,"type":"","demo":"databases\/get-database-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"range","description":"`Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/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":191,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":190,"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 `ID.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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","x-example":false}},"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":192,"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\/usage":{"get":{"summary":"Get Functions Usage","operationId":"functionsGetUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getUsage","weight":195,"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":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/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":193,"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":196,"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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","x-example":"[\"any\"]","items":{"type":"string"}},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","x-example":false}},"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":198,"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":200,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: entrypoint, size, buildId, activate","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":{"202":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":199,"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":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"getDeployment","weight":201,"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":197,"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":202,"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":"Create Build","operationId":"functionsCreateBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":203,"cookies":false,"type":"","demo":"functions\/create-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.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"},{"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.","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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, statusCode, duration","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":"ip:{ip},userId:{userId}","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 in the background. Default value is false.","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":"functionsGetFunctionUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getFunctionUsage","weight":194,"cookies":false,"type":"","demo":"functions\/get-function-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"}]}},"\/functions\/{functionId}\/variables":{"get":{"summary":"List Variables","operationId":"functionsListVariables","tags":["functions"],"description":"Get a list of all variables of a specific function.","responses":{"200":{"description":"Variables List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variableList"}}}}},"x-appwrite":{"method":"listVariables","weight":208,"cookies":false,"type":"","demo":"functions\/list-variables.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-variables.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"post":{"summary":"Create Variable","operationId":"functionsCreateVariable","tags":["functions"],"description":"Create a new function variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"createVariable","weight":207,"cookies":false,"type":"","demo":"functions\/create-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","x-example":"[VALUE]"}},"required":["key","value"]}}}}}},"\/functions\/{functionId}\/variables\/{variableId}":{"get":{"summary":"Get Variable","operationId":"functionsGetVariable","tags":["functions"],"description":"Get a variable by its unique ID.","responses":{"200":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"getVariable","weight":209,"cookies":false,"type":"","demo":"functions\/get-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_ID]"},"in":"path"}]},"put":{"summary":"Update Variable","operationId":"functionsUpdateVariable","tags":["functions"],"description":"Update variable by its unique ID.","responses":{"200":{"description":"Variable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/variable"}}}}},"x-appwrite":{"method":"updateVariable","weight":210,"cookies":false,"type":"","demo":"functions\/update-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","x-example":"[VALUE]"}},"required":["key"]}}}}},"delete":{"summary":"Delete Variable","operationId":"functionsDeleteVariable","tags":["functions"],"description":"Delete a variable by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteVariable","weight":211,"cookies":false,"type":"","demo":"functions\/delete-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-variable.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 unique ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"schema":{"type":"string","x-example":"[VARIABLE_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":90,"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":102,"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 servers are up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getCache","weight":93,"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 servers are up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getDB","weight":92,"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\/pubsub":{"get":{"summary":"Get PubSub","operationId":"healthGetPubSub","tags":["health"],"description":"Check the Appwrite pub-sub servers are up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getPubSub","weight":95,"cookies":false,"type":"","demo":"health\/get-pub-sub.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.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":{"get":{"summary":"Get Queue","operationId":"healthGetQueue","tags":["health"],"description":"Check the Appwrite queue messaging servers are up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getQueue","weight":94,"cookies":false,"type":"","demo":"health\/get-queue.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.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":99,"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":100,"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":98,"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\/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":97,"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":101,"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":96,"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":83,"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":"localeListContinents","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":"listContinents","weight":87,"cookies":false,"type":"","demo":"locale\/list-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountries","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":"listCountries","weight":84,"cookies":false,"type":"","demo":"locale\/list-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesEU","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":"listCountriesEU","weight":85,"cookies":false,"type":"","demo":"locale\/list-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesPhones","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":"listCountriesPhones","weight":86,"cookies":false,"type":"","demo":"locale\/list-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCurrencies","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":"listCurrencies","weight":88,"cookies":false,"type":"","demo":"locale\/list-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListLanguages","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":"listLanguages","weight":89,"cookies":false,"type":"","demo":"locale\/list-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":[]}]}},"\/project\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectGetUsage","tags":["project"],"description":"","responses":{"200":{"description":"UsageProject","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageProject"}}}}},"x-appwrite":{"method":"getUsage","weight":135,"cookies":false,"type":"","demo":"project\/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":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/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":105,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":104,"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 `ID.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]"},"region":{"type":"string","description":"Project Region.","x-example":"default"},"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":106,"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":107,"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":113,"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\/duration":{"patch":{"summary":"Update Project Authentication Duration","operationId":"projectsUpdateAuthDuration","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthDuration","weight":111,"cookies":false,"type":"","demo":"projects\/update-auth-duration.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":{"duration":{"type":"integer","description":"Project session length in seconds. Max length: 31536000 seconds.","x-example":0}},"required":["duration"]}}}}}},"\/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":110,"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":112,"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":131,"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":130,"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":132,"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":134,"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":133,"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":121,"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":120,"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. Maximum of 100 scopes are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","x-example":"2020-10-15T06:38:00.000+00:00"}},"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":122,"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":123,"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. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["name","scopes"]}}}}},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":124,"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":109,"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]"},"enabled":{"type":"boolean","description":"Provider status. Set to 'false' to disable new session creation.","x-example":false}},"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":126,"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":125,"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":null}},"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":127,"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":128,"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":null}},"required":["name"]}}}}},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":129,"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":108,"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}\/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":115,"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":114,"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. Maximum of 100 events are allowed.","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":116,"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":117,"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. Maximum of 100 events are allowed.","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":119,"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"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhookSignature","weight":118,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.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":137,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":136,"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 `ID.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]"},"permissions":{"type":"array","description":"An array of permission strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","x-example":"none"},"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"]}}}}}},"\/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":138,"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":139,"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","x-example":"none"},"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"]}}}}},"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":140,"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.","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":142,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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\/storage#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":141,"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":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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 `ID.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},"permissions":{"type":"array","description":"An array of permission strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","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":143,"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":147,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":{"permissions":{"type":"array","description":"An array of permission string. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","x-example":"[\"read(\"any\")\"]","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":148,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":145,"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":144,"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":146,"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":150,"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 storage bucket","operationId":"storageGetBucketUsage","tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageBuckets"}}}}},"x-appwrite":{"method":"getBucketUsage","weight":149,"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.","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":152,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":151,"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 `ID.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). Maximum of 100 roles are allowed, each 32 characters long.","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":153,"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":154,"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":155,"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}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":162,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"List Team Memberships","operationId":"teamsListMemberships","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":"listMemberships","weight":157,"cookies":false,"type":"","demo":"teams\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":156,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"getMembership","weight":158,"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":159,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":161,"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":160,"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":171,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"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"}]},"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":163,"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 `ID.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"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":"+12065550100"},"password":{"type":"string","description":"Plain text 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"]}}}}}},"\/users\/argon2":{"post":{"summary":"Create User with Argon2 Password","operationId":"usersCreateArgon2User","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createArgon2User","weight":166,"cookies":false,"type":"","demo":"users\/create-argon2user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-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 `ID.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 hashed using Argon2.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/bcrypt":{"post":{"summary":"Create User with Bcrypt Password","operationId":"usersCreateBcryptUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createBcryptUser","weight":164,"cookies":false,"type":"","demo":"users\/create-bcrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-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 `ID.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 hashed using Bcrypt.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/md5":{"post":{"summary":"Create User with MD5 Password","operationId":"usersCreateMD5User","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createMD5User","weight":165,"cookies":false,"type":"","demo":"users\/create-m-d5user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-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 `ID.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 hashed using MD5.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/phpass":{"post":{"summary":"Create User with PHPass Password","operationId":"usersCreatePHPassUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createPHPassUser","weight":168,"cookies":false,"type":"","demo":"users\/create-p-h-pass-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-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 `ID.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 hashed using PHPass.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/scrypt":{"post":{"summary":"Create User with Scrypt Password","operationId":"usersCreateScryptUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createScryptUser","weight":169,"cookies":false,"type":"","demo":"users\/create-scrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-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 `ID.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 hashed using Scrypt.","x-example":"password"},"passwordSalt":{"type":"string","description":"Optional salt used to hash password.","x-example":"[PASSWORD_SALT]"},"passwordCpu":{"type":"integer","description":"Optional CPU cost used to hash password.","x-example":null},"passwordMemory":{"type":"integer","description":"Optional memory cost used to hash password.","x-example":null},"passwordParallel":{"type":"integer","description":"Optional parallelization cost used to hash password.","x-example":null},"passwordLength":{"type":"integer","description":"Optional hash length used to hash password.","x-example":null},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordCpu","passwordMemory","passwordParallel","passwordLength"]}}}}}},"\/users\/scrypt-modified":{"post":{"summary":"Create User with Scrypt Modified Password","operationId":"usersCreateScryptModifiedUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createScryptModifiedUser","weight":170,"cookies":false,"type":"","demo":"users\/create-scrypt-modified-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-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 `ID.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 hashed using Scrypt Modified.","x-example":"password"},"passwordSalt":{"type":"string","description":"Salt used to hash password.","x-example":"[PASSWORD_SALT]"},"passwordSaltSeparator":{"type":"string","description":"Salt separator used to hash password.","x-example":"[PASSWORD_SALT_SEPARATOR]"},"passwordSignerKey":{"type":"string","description":"Signer key used to hash password.","x-example":"[PASSWORD_SIGNER_KEY]"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordSaltSeparator","passwordSignerKey"]}}}}}},"\/users\/sha":{"post":{"summary":"Create User with SHA Password","operationId":"usersCreateSHAUser","tags":["users"],"description":"Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"createSHAUser","weight":167,"cookies":false,"type":"","demo":"users\/create-s-h-a-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-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 `ID.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 hashed using SHA.","x-example":"password"},"passwordVersion":{"type":"string","description":"Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'","x-example":"sha1"},"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":189,"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"}]}},"\/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":172,"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, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":188,"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":182,"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":"List User Logs","operationId":"usersListLogs","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":"listLogs","weight":176,"cookies":false,"type":"","demo":"users\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"List User Memberships","operationId":"usersListMemberships","tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"listMemberships","weight":175,"cookies":false,"type":"","demo":"users\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.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"}]}},"\/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":180,"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":181,"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}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":183,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.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":{"number":{"type":"string","description":"User phone number.","x-example":"+12065550100"}},"required":["number"]}}}}}},"\/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":173,"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":185,"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":"List User Sessions","operationId":"usersListSessions","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":"listSessions","weight":174,"cookies":false,"type":"","demo":"users\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":187,"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":186,"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. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":177,"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":"usersUpdateEmailVerification","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":"updateEmailVerification","weight":184,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-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"]}}}}}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":179,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-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":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","x-example":false}},"required":["phoneVerification"]}}}}}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","x-globalAttributes":[]},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.","x-globalAttributes":[]},{"name":"databases","description":"The Databases service allows you to create structured collections of documents, query and filter lists of documents","x-globalAttributes":["databaseId"]},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location.","x-globalAttributes":[]},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health.","x-globalAttributes":[]},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"project","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"storage","description":"The Storage service allows you to manage your project files.","x-globalAttributes":[]},{"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","x-globalAttributes":[]},{"name":"users","description":"The Users service allows you to manage your project users.","x-globalAttributes":[]},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions.","x-globalAttributes":[]}],"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"]},"databaseList":{"description":"Databases List","type":"object","properties":{"total":{"type":"integer","description":"Total number of databases documents that matched your query.","x-example":5,"format":"int32"},"databases":{"type":"array","description":"List of databases.","items":{"$ref":"#\/components\/schemas\/database"},"x-example":""}},"required":["total","databases"]},"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"]},"variableList":{"description":"Variables List","type":"object","properties":{"total":{"type":"integer","description":"Total number of variables documents that matched your query.","x-example":5,"format":"int32"},"variables":{"type":"array","description":"List of variables.","items":{"$ref":"#\/components\/schemas\/variable"},"x-example":""}},"required":["total","variables"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"},"$createdAt":{"type":"string","description":"Database creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Database update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","name","$createdAt","$updatedAt"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Collection creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Collection update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Collection permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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\/attributeDatetime"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$permissions","databaseId","name","enabled","documentSecurity","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\/attributeDatetime"},{"$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"]},"attributeDatetime":{"description":"AttributeDatetime","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"birthDay"},"type":{"type":"string","description":"Attribute type.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"ISO 8601 format.","x-example":"datetime"},"default":{"type":"string","description":"Default value for attribute when not provided. Only null is optional","x-example":"2020-10-15T06:38:00.000+00:00","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":[],"nullable":true}},"required":["key","type","status","attributes"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collectionId":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"string","description":"Document creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Document update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Document permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]}},"additionalProperties":true,"required":["$id","$collectionId","$databaseId","$createdAt","$updatedAt","$permissions"]},"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":"string","description":"Log creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"password":{"type":"string","description":"Hashed user password.","x-example":"$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE"},"hash":{"type":"string","description":"Password hashing algorithm.","x-example":"argon2"},"hashOptions":{"type":"object","description":"Password hashing algorithm configuration.","x-example":{},"items":{"oneOf":[{"$ref":"#\/components\/schemas\/algoArgon2"},{"$ref":"#\/components\/schemas\/algoScrypt"},{"$ref":"#\/components\/schemas\/algoScryptModified"},{"$ref":"#\/components\/schemas\/algoBcrypt"},{"$ref":"#\/components\/schemas\/algoPhpass"},{"$ref":"#\/components\/schemas\/algoSha"},{"$ref":"#\/components\/schemas\/algoMd5"}]}},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","password","hash","hashOptions","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"algoMd5":{"description":"AlgoMD5","type":"object"},"algoSha":{"description":"AlgoSHA","type":"object"},"algoPhpass":{"description":"AlgoPHPass","type":"object"},"algoBcrypt":{"description":"AlgoBcrypt","type":"object"},"algoScrypt":{"description":"AlgoScrypt","type":"object","properties":{"costCpu":{"type":"integer","description":"CPU complexity of computed hash.","x-example":8,"format":"int32"},"costMemory":{"type":"integer","description":"Memory complexity of computed hash.","x-example":14,"format":"int32"},"costParallel":{"type":"integer","description":"Parallelization of computed hash.","x-example":1,"format":"int32"},"length":{"type":"integer","description":"Length used to compute hash.","x-example":64,"format":"int32"}},"required":["costCpu","costMemory","costParallel","length"]},"algoScryptModified":{"description":"AlgoScryptModified","type":"object","properties":{"salt":{"type":"string","description":"Salt used to compute hash.","x-example":"UxLMreBr6tYyjQ=="},"saltSeparator":{"type":"string","description":"Separator used to compute hash.","x-example":"Bw=="},"signerKey":{"type":"string","description":"Key used to compute hash.","x-example":"XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ=="}},"required":["salt","saltSeparator","signerKey"]},"algoArgon2":{"description":"AlgoArgon2","type":"object","properties":{"memoryCost":{"type":"integer","description":"Memory used to compute hash.","x-example":65536,"format":"int32"},"timeCost":{"type":"integer","description":"Amount of time consumed to compute hash","x-example":4,"format":"int32"},"threads":{"type":"integer","description":"Number of threads used to compute hash.","x-example":3,"format":"int32"}},"required":["memoryCost","timeCost","threads"]},"account":{"description":"Account","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Session creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"string","description":"Session expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"The date of when the access token expires in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","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"},"$createdAt":{"type":"string","description":"Token creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"Token expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","$createdAt","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"},"$createdAt":{"type":"string","description":"File creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"File update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"File permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"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","$createdAt","$updatedAt","$permissions","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Bucket creation time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Bucket update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Bucket permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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"]},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).","x-example":"gzip"},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$createdAt","$updatedAt","$permissions","fileSecurity","name","enabled","maximumFileSize","allowedFileExtensions","compression","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Team creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Team update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Membership creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Membership update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"string","description":"Date, the user has been invited to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"joined":{"type":"string","description":"Date, the user has accepted the invitation to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Function creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Function update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"users"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"enabled":{"type":"boolean","description":"Function enabled.","x-example":false},"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":"array","description":"Function variables.","items":{"$ref":"#\/components\/schemas\/variable"},"x-example":[]},"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 * * *"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","runtime","deployment","vars","events","schedule","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"},"$createdAt":{"type":"string","description":"Deployment creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Deployment update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Execution creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Execution upate date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Execution roles.","items":{"type":"string"},"x-example":["any"]},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"duration":{"type":"number","description":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Project creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Project update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"authDuration":{"type":"integer","description":"Session duration in seconds.","x-example":60,"format":"int32"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"providers":{"type":"array","description":"List of Providers.","items":{"$ref":"#\/components\/schemas\/provider"},"x-example":{}},"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":{}},"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},"serviceStatusForDatabases":{"type":"boolean","description":"Databases 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","$createdAt","$updatedAt","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authDuration","authLimit","providers","platforms","webhooks","keys","domains","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Webhook creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Webhook update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"signatureKey":{"type":"string","description":"Signature key which can be used to validated incoming","x-example":"ad3d581ca230e2b7059c545e5a"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Key creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Key update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"expire":{"type":"string","description":"Key expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"},"accessedAt":{"type":"string","description":"Most recent access date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"sdks":{"type":"array","description":"List of SDK user agents that used this key.","items":{"type":"string"},"x-example":"appwrite:flutter"}},"required":["$id","$createdAt","$updatedAt","name","expire","scopes","secret","accessedAt","sdks"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Domain creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Domain update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"provider":{"description":"Provider","type":"object","properties":{"name":{"type":"string","description":"Provider name.","x-example":"GitHub"},"appId":{"type":"string","description":"OAuth 2.0 application ID.","x-example":"259125845563242502"},"secret":{"type":"string","description":"OAuth 2.0 application secret. Might be JSON string if provider requires extra configuration.","x-example":"Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ"},"enabled":{"type":"boolean","description":"Provider is active and can be used to create session.","x-example":""}},"required":["name","appId","secret","enabled"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Platform creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Platform update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","name","type","key","store","hostname","httpUser","httpPass"]},"variable":{"description":"Variable","type":"object","properties":{"$id":{"type":"string","description":"Variable ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"key":{"type":"string","description":"Variable key.","x-example":"API_KEY"},"value":{"type":"string","description":"Variable value.","x-example":"myPa$$word1"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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":{"name":{"type":"string","description":"Name of the service.","x-example":"database"},"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":["name","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"]},"metric":{"description":"Metric","type":"object","properties":{"value":{"type":"integer","description":"The value of this metric at the timestamp.","x-example":1,"format":"int32"},"date":{"type":"string","description":"The date at which this metric was aggregated in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["value","date"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","databasesTotal","collectionsTotal","documentsTotal"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","collectionsTotal","documentsTotal"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","documentsTotal"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersTotal":{"type":"array","description":"Aggregated stats for total number of users.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"sessionsTotal":{"type":"array","description":"Aggregated stats for sessions created.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","usersTotal","sessionsTotal"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"bucketsTotal":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","bucketsTotal","filesTotal","filesStorage"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","filesTotal","filesStorage"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsTotal":{"type":"array","description":"Aggregated stats for number of functions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"deploymentsTotal":{"type":"array","description":"Aggregated stats for number of function deployments.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"deploymentsStorage":{"type":"array","description":"Aggregated stats for function deployments storage.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsTotal":{"type":"array","description":"Aggregated stats for number of function builds.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsStorage":{"type":"array","description":"Aggregated stats for builds storage.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"buildsTime":{"type":"array","description":"Aggregated stats for function build compute.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for number of function executions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsTime":{"type":"array","description":"Aggregated stats for function execution compute.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","functionsTotal","deploymentsTotal","deploymentsStorage","buildsTotal","buildsStorage","buildsTime","executionsTotal","executionsTime"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requestsTotal":{"type":"array","description":"Aggregated stats for number of requests.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for number of documents.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"databasesTotal":{"type":"array","description":"Aggregated stats for number of databases.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"usersTotal":{"type":"array","description":"Aggregated stats for number of users.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]},"bucketsTotal":{"type":"array","description":"Aggregated stats for number of buckets.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":[]}},"required":["range","requestsTotal","network","executionsTotal","documentsTotal","databasesTotal","usersTotal","filesStorage","bucketsTotal"]}},"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/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 119082542..32d5cc300 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"version":"1.1.2","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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"get","weight":19,"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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"create","weight":7,"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 `ID.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"]}}]}},"\/account\/email":{"patch":{"summary":"Update 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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateEmail","weight":26,"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\/invite":{"post":{"summary":"Create account using an invite code","operationId":"accountCreateWithInviteCode","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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"createWithInviteCode","weight":6,"cookies":false,"type":"","demo":"account\/create-with-invite-code.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":["console"],"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 `ID.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]"},"code":{"type":"string","description":"An invite code to restrict user signups on the Appwrite console. Users with an invite code will be able to create accounts irrespective of email and IP whitelists.","default":"","x-example":"[CODE]"}},"required":["userId","email","password"]}}]}},"\/account\/jwt":{"post":{"summary":"Create 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":18,"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":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","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":"listLogs","weight":22,"cookies":false,"type":"","demo":"account\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Name","operationId":"accountUpdateName","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateName","weight":24,"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 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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePassword","weight":25,"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\/phone":{"patch":{"summary":"Update Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.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":{"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["phone","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":20,"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 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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePrefs","weight":28,"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":33,"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":34,"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":"List Sessions","operationId":"accountListSessions","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":"listSessions","weight":21,"cookies":false,"type":"","demo":"account\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":[]}]},"delete":{"summary":"Delete 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":32,"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":17,"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\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","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":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.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"]}}]}},"\/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. If the provided user ID has not be registered, a new user will be created. 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":13,"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 `ID.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":14,"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 OAuth2 Session","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":9,"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, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","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. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-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 `ID.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]"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"}},"required":["userId","phone"]}}]},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":16,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-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\/{sessionId}":{"get":{"summary":"Get Session","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":23,"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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":31,"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 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":30,"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\/status":{"patch":{"summary":"Update Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateStatus","weight":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.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\/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#accountUpdateEmailVerification). 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":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-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":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-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"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number 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":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":40,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":39,"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":43,"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. Country codes follow the [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":41,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":42,"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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":45,"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":"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.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":44,"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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.","responses":{"200":{"description":"Databases List","schema":{"$ref":"#\/definitions\/databaseList"}}},"x-appwrite":{"method":"list","weight":47,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Database.\n","responses":{"201":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"create","weight":46,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"databaseId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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":"[DATABASE_ID]","x-global":true},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["databaseId","name"]}}]}},"\/databases\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","schema":{"$ref":"#\/definitions\/usageDatabases"}}},"x-appwrite":{"method":"getUsage","weight":80,"cookies":false,"type":"","demo":"databases\/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"}]}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.","responses":{"200":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"get","weight":48,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Update a database by its unique ID.","responses":{"200":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"update","weight":50,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_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]"}},"required":["name"]}}]},"delete":{"summary":"Delete Database","operationId":"databasesDelete","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":51,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"listCollections","weight":53,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":52,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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]"},"permissions":{"type":"array","description":"An array of permissions strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false}},"required":["collectionId","name"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":54,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"updateCollection","weight":56,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permission are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","default":true,"x-example":false}},"required":["name"]}}]},"delete":{"summary":"Delete Collection","operationId":"databasesDeleteCollection","consumes":["application\/json"],"produces":[],"tags":["databases"],"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":57,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":67,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a boolean attribute.\n","responses":{"202":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"createBooleanAttribute","weight":65,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":66,"cookies":false,"type":"","demo":"databases\/create-datetime-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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 the attribute in ISO 8601 format. Cannot be set when attribute is required.","default":null,"x-example":"2020-10-15T06:38:00.000+00:00"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create an email attribute.\n","responses":{"202":{"description":"AttributeEmail","schema":{"$ref":"#\/definitions\/attributeEmail"}}},"x-appwrite":{"method":"createEmailAttribute","weight":59,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":60,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 elements are allowed, each 4096 characters long.","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeFloat","schema":{"$ref":"#\/definitions\/attributeFloat"}}},"x-appwrite":{"method":"createFloatAttribute","weight":64,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeInteger","schema":{"$ref":"#\/definitions\/attributeInteger"}}},"x-appwrite":{"method":"createIntegerAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create IP address attribute.\n","responses":{"202":{"description":"AttributeIP","schema":{"$ref":"#\/definitions\/attributeIp"}}},"x-appwrite":{"method":"createIpAttribute","weight":61,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a string attribute.\n","responses":{"202":{"description":"AttributeString","schema":{"$ref":"#\/definitions\/attributeString"}}},"x-appwrite":{"method":"createStringAttribute","weight":58,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a URL attribute.\n","responses":{"202":{"description":"AttributeURL","schema":{"$ref":"#\/definitions\/attributeUrl"}}},"x-appwrite":{"method":"createUrlAttribute","weight":62,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime, or AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeString","schema":{"x-oneOf":[{"$ref":"#\/definitions\/attributeDatetime"},{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeDatetime"},{"$ref":"#\/definitions\/attributeString"}]}}},"x-appwrite":{"method":"getAttribute","weight":68,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteAttribute","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":69,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Attribute Key.","required":true,"type":"string","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all the user's documents in a given collection. You can use the query params to filter your results.","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":75,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":74,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 `ID.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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":76,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":78,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}}}}]},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":79,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databasesListDocumentLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":77,"cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":71,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":70,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 attributes are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":72,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteIndex","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":73,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Index Key.","required":true,"type":"string","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListCollectionLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":55,"cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","schema":{"$ref":"#\/definitions\/usageCollection"}}},"x-appwrite":{"method":"getCollectionUsage","weight":82,"cookies":false,"type":"","demo":"databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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"}]}},"\/databases\/{databaseId}\/logs":{"get":{"summary":"List Database Logs","operationId":"databasesListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get the database activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":49,"cookies":false,"type":"","demo":"databases\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","schema":{"$ref":"#\/definitions\/usageDatabase"}}},"x-appwrite":{"method":"getDatabaseUsage","weight":81,"cookies":false,"type":"","demo":"databases\/get-database-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"range","description":"`Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/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":191,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":190,"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 `ID.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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","default":null,"x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","default":null,"x-example":"node-14.5"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","default":true,"x-example":false}},"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":192,"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\/usage":{"get":{"summary":"Get Functions 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":195,"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":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/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":193,"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":196,"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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","default":null,"x-example":"[\"any\"]","items":{"type":"string"}},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","default":true,"x-example":false}},"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":198,"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":200,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: entrypoint, size, buildId, activate","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":{"202":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":199,"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":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"getDeployment","weight":201,"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":197,"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":202,"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":"Create Build","operationId":"functionsCreateBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":203,"cookies":false,"type":"","demo":"functions\/create-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.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"},{"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.","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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, statusCode, duration","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":"ip:{ip},userId:{userId}","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 in the background. Default value is false.","default":false,"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":"functionsGetFunctionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","schema":{"$ref":"#\/definitions\/usageFunctions"}}},"x-appwrite":{"method":"getFunctionUsage","weight":194,"cookies":false,"type":"","demo":"functions\/get-function-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"}]}},"\/functions\/{functionId}\/variables":{"get":{"summary":"List Variables","operationId":"functionsListVariables","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all variables of a specific function.","responses":{"200":{"description":"Variables List","schema":{"$ref":"#\/definitions\/variableList"}}},"x-appwrite":{"method":"listVariables","weight":208,"cookies":false,"type":"","demo":"functions\/list-variables.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-variables.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]},"post":{"summary":"Create Variable","operationId":"functionsCreateVariable","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Create a new function variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"createVariable","weight":207,"cookies":false,"type":"","demo":"functions\/create-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","default":null,"x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","default":null,"x-example":"[VALUE]"}},"required":["key","value"]}}]}},"\/functions\/{functionId}\/variables\/{variableId}":{"get":{"summary":"Get Variable","operationId":"functionsGetVariable","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a variable by its unique ID.","responses":{"200":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"getVariable","weight":209,"cookies":false,"type":"","demo":"functions\/get-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"type":"string","x-example":"[VARIABLE_ID]","in":"path"}]},"put":{"summary":"Update Variable","operationId":"functionsUpdateVariable","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update variable by its unique ID.","responses":{"200":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"updateVariable","weight":210,"cookies":false,"type":"","demo":"functions\/update-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"type":"string","x-example":"[VARIABLE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","default":null,"x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","default":null,"x-example":"[VALUE]"}},"required":["key"]}}]},"delete":{"summary":"Delete Variable","operationId":"functionsDeleteVariable","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a variable by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteVariable","weight":211,"cookies":false,"type":"","demo":"functions\/delete-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"type":"string","x-example":"[VARIABLE_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":90,"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":102,"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 servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getCache","weight":93,"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 servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":92,"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\/pubsub":{"get":{"summary":"Get PubSub","operationId":"healthGetPubSub","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite pub-sub servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getPubSub","weight":95,"cookies":false,"type":"","demo":"health\/get-pub-sub.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.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":{"get":{"summary":"Get Queue","operationId":"healthGetQueue","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite queue messaging servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getQueue","weight":94,"cookies":false,"type":"","demo":"health\/get-queue.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.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":99,"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":100,"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":98,"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\/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":97,"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":101,"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":96,"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":83,"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":"localeListContinents","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":"listContinents","weight":87,"cookies":false,"type":"","demo":"locale\/list-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountries","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":"listCountries","weight":84,"cookies":false,"type":"","demo":"locale\/list-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesEU","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":"listCountriesEU","weight":85,"cookies":false,"type":"","demo":"locale\/list-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesPhones","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":"listCountriesPhones","weight":86,"cookies":false,"type":"","demo":"locale\/list-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCurrencies","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":"listCurrencies","weight":88,"cookies":false,"type":"","demo":"locale\/list-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListLanguages","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":"listLanguages","weight":89,"cookies":false,"type":"","demo":"locale\/list-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":[]}]}},"\/project\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["project"],"description":"","responses":{"200":{"description":"UsageProject","schema":{"$ref":"#\/definitions\/usageProject"}}},"x-appwrite":{"method":"getUsage","weight":135,"cookies":false,"type":"","demo":"project\/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":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/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":105,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":104,"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 `ID.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]"},"region":{"type":"string","description":"Project Region.","default":"default","x-example":"default"},"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":106,"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":107,"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":113,"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\/duration":{"patch":{"summary":"Update Project Authentication Duration","operationId":"projectsUpdateAuthDuration","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthDuration","weight":111,"cookies":false,"type":"","demo":"projects\/update-auth-duration.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":{"duration":{"type":"integer","description":"Project session length in seconds. Max length: 31536000 seconds.","default":null,"x-example":0}},"required":["duration"]}}]}},"\/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":110,"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":112,"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":131,"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":130,"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":132,"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":134,"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":133,"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":121,"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":120,"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. Maximum of 100 scopes are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","default":null,"x-example":"2020-10-15T06:38:00.000+00:00"}},"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":122,"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":123,"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. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","default":null,"x-example":"2020-10-15T06:38:00.000+00:00"}},"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":124,"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":109,"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":null,"x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","default":null,"x-example":"[SECRET]"},"enabled":{"type":"boolean","description":"Provider status. Set to 'false' to disable new session creation.","default":null,"x-example":false}},"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":126,"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":125,"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":null}},"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":127,"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":128,"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":null}},"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":129,"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":108,"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}\/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":115,"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":114,"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. Maximum of 100 events are allowed.","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":116,"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":117,"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. Maximum of 100 events are allowed.","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":119,"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"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhookSignature","weight":118,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.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":137,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":136,"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 `ID.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]"},"permissions":{"type":"array","description":"An array of permission strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","default":"none","x-example":"none"},"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"]}}]}},"\/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":138,"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":139,"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","default":"none","x-example":"none"},"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"]}}]},"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":140,"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.","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":142,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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\/storage#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":141,"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":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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 `ID.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":"permissions","description":"An array of permission strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"read(\"any\")\"]","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":143,"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":147,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":{"permissions":{"type":"array","description":"An array of permission string. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","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":148,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":145,"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":144,"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":146,"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":150,"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 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":149,"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.","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":152,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":151,"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 `ID.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). Maximum of 100 roles are allowed, each 32 characters long.","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":153,"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":154,"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":155,"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}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":162,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"List Team Memberships","operationId":"teamsListMemberships","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":"listMemberships","weight":157,"cookies":false,"type":"","demo":"teams\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":156,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","weight":158,"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":159,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":161,"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":160,"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":171,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":163,"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 `ID.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"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"},"password":{"type":"string","description":"Plain text 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"]}}]}},"\/users\/argon2":{"post":{"summary":"Create User with Argon2 Password","operationId":"usersCreateArgon2User","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createArgon2User","weight":166,"cookies":false,"type":"","demo":"users\/create-argon2user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-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 `ID.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 hashed using Argon2.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/bcrypt":{"post":{"summary":"Create User with Bcrypt Password","operationId":"usersCreateBcryptUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createBcryptUser","weight":164,"cookies":false,"type":"","demo":"users\/create-bcrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-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 `ID.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 hashed using Bcrypt.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/md5":{"post":{"summary":"Create User with MD5 Password","operationId":"usersCreateMD5User","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createMD5User","weight":165,"cookies":false,"type":"","demo":"users\/create-m-d5user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-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 `ID.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 hashed using MD5.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/phpass":{"post":{"summary":"Create User with PHPass Password","operationId":"usersCreatePHPassUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createPHPassUser","weight":168,"cookies":false,"type":"","demo":"users\/create-p-h-pass-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-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 `ID.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 hashed using PHPass.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/scrypt":{"post":{"summary":"Create User with Scrypt Password","operationId":"usersCreateScryptUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createScryptUser","weight":169,"cookies":false,"type":"","demo":"users\/create-scrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-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 `ID.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 hashed using Scrypt.","default":null,"x-example":"password"},"passwordSalt":{"type":"string","description":"Optional salt used to hash password.","default":null,"x-example":"[PASSWORD_SALT]"},"passwordCpu":{"type":"integer","description":"Optional CPU cost used to hash password.","default":null,"x-example":null},"passwordMemory":{"type":"integer","description":"Optional memory cost used to hash password.","default":null,"x-example":null},"passwordParallel":{"type":"integer","description":"Optional parallelization cost used to hash password.","default":null,"x-example":null},"passwordLength":{"type":"integer","description":"Optional hash length used to hash password.","default":null,"x-example":null},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordCpu","passwordMemory","passwordParallel","passwordLength"]}}]}},"\/users\/scrypt-modified":{"post":{"summary":"Create User with Scrypt Modified Password","operationId":"usersCreateScryptModifiedUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createScryptModifiedUser","weight":170,"cookies":false,"type":"","demo":"users\/create-scrypt-modified-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-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 `ID.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 hashed using Scrypt Modified.","default":null,"x-example":"password"},"passwordSalt":{"type":"string","description":"Salt used to hash password.","default":null,"x-example":"[PASSWORD_SALT]"},"passwordSaltSeparator":{"type":"string","description":"Salt separator used to hash password.","default":null,"x-example":"[PASSWORD_SALT_SEPARATOR]"},"passwordSignerKey":{"type":"string","description":"Signer key used to hash password.","default":null,"x-example":"[PASSWORD_SIGNER_KEY]"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordSaltSeparator","passwordSignerKey"]}}]}},"\/users\/sha":{"post":{"summary":"Create User with SHA Password","operationId":"usersCreateSHAUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createSHAUser","weight":167,"cookies":false,"type":"","demo":"users\/create-s-h-a-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-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 `ID.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 hashed using SHA.","default":null,"x-example":"password"},"passwordVersion":{"type":"string","description":"Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'","default":"","x-example":"sha1"},"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":189,"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"}]}},"\/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":172,"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, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":188,"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":182,"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":"List User Logs","operationId":"usersListLogs","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":"listLogs","weight":176,"cookies":false,"type":"","demo":"users\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"List User Memberships","operationId":"usersListMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"listMemberships","weight":175,"cookies":false,"type":"","demo":"users\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.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"}]}},"\/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":180,"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":181,"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}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":183,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.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":{"number":{"type":"string","description":"User phone number.","default":null,"x-example":"+12065550100"}},"required":["number"]}}]}},"\/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":173,"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":185,"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":"List User Sessions","operationId":"usersListSessions","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":"listSessions","weight":174,"cookies":false,"type":"","demo":"users\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":187,"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":186,"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. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":177,"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":"usersUpdateEmailVerification","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":"updateEmailVerification","weight":184,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-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"]}}]}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":179,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-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":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","x-globalAttributes":[]},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.","x-globalAttributes":[]},{"name":"databases","description":"The Databases service allows you to create structured collections of documents, query and filter lists of documents","x-globalAttributes":["databaseId"]},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location.","x-globalAttributes":[]},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health.","x-globalAttributes":[]},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"project","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"storage","description":"The Storage service allows you to manage your project files.","x-globalAttributes":[]},{"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","x-globalAttributes":[]},{"name":"users","description":"The Users service allows you to manage your project users.","x-globalAttributes":[]},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions.","x-globalAttributes":[]}],"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"]},"databaseList":{"description":"Databases List","type":"object","properties":{"total":{"type":"integer","description":"Total number of databases documents that matched your query.","x-example":5,"format":"int32"},"databases":{"type":"array","description":"List of databases.","items":{"type":"object","$ref":"#\/definitions\/database"},"x-example":""}},"required":["total","databases"]},"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"]},"variableList":{"description":"Variables List","type":"object","properties":{"total":{"type":"integer","description":"Total number of variables documents that matched your query.","x-example":5,"format":"int32"},"variables":{"type":"array","description":"List of variables.","items":{"type":"object","$ref":"#\/definitions\/variable"},"x-example":""}},"required":["total","variables"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"},"$createdAt":{"type":"string","description":"Database creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Database update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","name","$createdAt","$updatedAt"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Collection creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Collection update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Collection permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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\/attributeDatetime"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$permissions","databaseId","name","enabled","documentSecurity","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\/attributeDatetime"},{"$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"]},"attributeDatetime":{"description":"AttributeDatetime","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"birthDay"},"type":{"type":"string","description":"Attribute type.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"ISO 8601 format.","x-example":"datetime"},"default":{"type":"string","description":"Default value for attribute when not provided. Only null is optional","x-example":"2020-10-15T06:38:00.000+00:00","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":[],"x-nullable":true}},"required":["key","type","status","attributes"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collectionId":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"string","description":"Document creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Document update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Document permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]}},"additionalProperties":true,"required":["$id","$collectionId","$databaseId","$createdAt","$updatedAt","$permissions"]},"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":"string","description":"Log creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"password":{"type":"string","description":"Hashed user password.","x-example":"$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE"},"hash":{"type":"string","description":"Password hashing algorithm.","x-example":"argon2"},"hashOptions":{"type":"object","description":"Password hashing algorithm configuration.","x-example":{},"items":{"x-oneOf":[{"$ref":"#\/definitions\/algoArgon2"},{"$ref":"#\/definitions\/algoScrypt"},{"$ref":"#\/definitions\/algoScryptModified"},{"$ref":"#\/definitions\/algoBcrypt"},{"$ref":"#\/definitions\/algoPhpass"},{"$ref":"#\/definitions\/algoSha"},{"$ref":"#\/definitions\/algoMd5"}]}},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","password","hash","hashOptions","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"algoMd5":{"description":"AlgoMD5","type":"object"},"algoSha":{"description":"AlgoSHA","type":"object"},"algoPhpass":{"description":"AlgoPHPass","type":"object"},"algoBcrypt":{"description":"AlgoBcrypt","type":"object"},"algoScrypt":{"description":"AlgoScrypt","type":"object","properties":{"costCpu":{"type":"integer","description":"CPU complexity of computed hash.","x-example":8,"format":"int32"},"costMemory":{"type":"integer","description":"Memory complexity of computed hash.","x-example":14,"format":"int32"},"costParallel":{"type":"integer","description":"Parallelization of computed hash.","x-example":1,"format":"int32"},"length":{"type":"integer","description":"Length used to compute hash.","x-example":64,"format":"int32"}},"required":["costCpu","costMemory","costParallel","length"]},"algoScryptModified":{"description":"AlgoScryptModified","type":"object","properties":{"salt":{"type":"string","description":"Salt used to compute hash.","x-example":"UxLMreBr6tYyjQ=="},"saltSeparator":{"type":"string","description":"Separator used to compute hash.","x-example":"Bw=="},"signerKey":{"type":"string","description":"Key used to compute hash.","x-example":"XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ=="}},"required":["salt","saltSeparator","signerKey"]},"algoArgon2":{"description":"AlgoArgon2","type":"object","properties":{"memoryCost":{"type":"integer","description":"Memory used to compute hash.","x-example":65536,"format":"int32"},"timeCost":{"type":"integer","description":"Amount of time consumed to compute hash","x-example":4,"format":"int32"},"threads":{"type":"integer","description":"Number of threads used to compute hash.","x-example":3,"format":"int32"}},"required":["memoryCost","timeCost","threads"]},"account":{"description":"Account","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Session creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"string","description":"Session expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"The date of when the access token expires in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","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"},"$createdAt":{"type":"string","description":"Token creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"Token expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","$createdAt","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"},"$createdAt":{"type":"string","description":"File creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"File update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"File permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"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","$createdAt","$updatedAt","$permissions","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Bucket creation time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Bucket update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Bucket permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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"]},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).","x-example":"gzip"},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$createdAt","$updatedAt","$permissions","fileSecurity","name","enabled","maximumFileSize","allowedFileExtensions","compression","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Team creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Team update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Membership creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Membership update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"string","description":"Date, the user has been invited to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"joined":{"type":"string","description":"Date, the user has accepted the invitation to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Function creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Function update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"users"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"enabled":{"type":"boolean","description":"Function enabled.","x-example":false},"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":"array","description":"Function variables.","items":{"type":"object","$ref":"#\/definitions\/variable"},"x-example":[]},"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 * * *"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","runtime","deployment","vars","events","schedule","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"},"$createdAt":{"type":"string","description":"Deployment creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Deployment update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Execution creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Execution upate date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Execution roles.","items":{"type":"string"},"x-example":["any"]},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"duration":{"type":"number","description":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Project creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Project update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"authDuration":{"type":"integer","description":"Session duration in seconds.","x-example":60,"format":"int32"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"providers":{"type":"array","description":"List of Providers.","items":{"type":"object","$ref":"#\/definitions\/provider"},"x-example":{}},"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":{}},"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},"serviceStatusForDatabases":{"type":"boolean","description":"Databases 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","$createdAt","$updatedAt","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authDuration","authLimit","providers","platforms","webhooks","keys","domains","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Webhook creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Webhook update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"signatureKey":{"type":"string","description":"Signature key which can be used to validated incoming","x-example":"ad3d581ca230e2b7059c545e5a"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Key creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Key update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"expire":{"type":"string","description":"Key expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"},"accessedAt":{"type":"string","description":"Most recent access date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"sdks":{"type":"array","description":"List of SDK user agents that used this key.","items":{"type":"string"},"x-example":"appwrite:flutter"}},"required":["$id","$createdAt","$updatedAt","name","expire","scopes","secret","accessedAt","sdks"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Domain creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Domain update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"provider":{"description":"Provider","type":"object","properties":{"name":{"type":"string","description":"Provider name.","x-example":"GitHub"},"appId":{"type":"string","description":"OAuth 2.0 application ID.","x-example":"259125845563242502"},"secret":{"type":"string","description":"OAuth 2.0 application secret. Might be JSON string if provider requires extra configuration.","x-example":"Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ"},"enabled":{"type":"boolean","description":"Provider is active and can be used to create session.","x-example":""}},"required":["name","appId","secret","enabled"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Platform creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Platform update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","name","type","key","store","hostname","httpUser","httpPass"]},"variable":{"description":"Variable","type":"object","properties":{"$id":{"type":"string","description":"Variable ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"key":{"type":"string","description":"Variable key.","x-example":"API_KEY"},"value":{"type":"string","description":"Variable value.","x-example":"myPa$$word1"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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":{"name":{"type":"string","description":"Name of the service.","x-example":"database"},"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":["name","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"]},"metric":{"description":"Metric","type":"object","properties":{"value":{"type":"integer","description":"The value of this metric at the timestamp.","x-example":1,"format":"int32"},"date":{"type":"string","description":"The date at which this metric was aggregated in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["value","date"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","databasesTotal","collectionsTotal","documentsTotal"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","collectionsTotal","documentsTotal"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","documentsTotal"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersTotal":{"type":"array","description":"Aggregated stats for total number of users.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"sessionsTotal":{"type":"array","description":"Aggregated stats for sessions created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","usersTotal","sessionsTotal"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"bucketsTotal":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","bucketsTotal","filesTotal","storage"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","filesTotal","filesStorage"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsTotal":{"type":"array","description":"Aggregated stats for number of functions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"deploymentsTotal":{"type":"array","description":"Aggregated stats for number of function deployments.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"deploymentsStorage":{"type":"array","description":"Aggregated stats for function deployments storage.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsTotal":{"type":"array","description":"Aggregated stats for number of function builds.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsStorage":{"type":"array","description":"Aggregated stats for builds storage.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsTime":{"type":"array","description":"Aggregated stats for function build compute.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for number of function executions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsTime":{"type":"array","description":"Aggregated stats for function execution compute.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","functionsTotal","deploymentsTotal","deploymentsStorage","buildsTotal","buildsStorage","buildsTime","executionsTotal","executionsTime"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requestsTotal":{"type":"array","description":"Aggregated stats for number of requests.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databasesTotal":{"type":"array","description":"Aggregated stats for number of databases.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"usersTotal":{"type":"array","description":"Aggregated stats for number of users.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsTotal":{"type":"array","description":"Aggregated stats for number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","requestsTotal","network","executionsTotal","documentsTotal","databasesTotal","usersTotal","filesStorage","bucketsTotal"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"swagger":"2.0","info":{"version":"1.1.2","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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"get","weight":19,"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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"create","weight":7,"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 `ID.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"]}}]}},"\/account\/email":{"patch":{"summary":"Update 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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateEmail","weight":26,"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\/invite":{"post":{"summary":"Create account using an invite code","operationId":"accountCreateWithInviteCode","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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"createWithInviteCode","weight":6,"cookies":false,"type":"","demo":"account\/create-with-invite-code.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":["console"],"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 `ID.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]"},"code":{"type":"string","description":"An invite code to restrict user signups on the Appwrite console. Users with an invite code will be able to create accounts irrespective of email and IP whitelists.","default":"","x-example":"[CODE]"}},"required":["userId","email","password"]}}]}},"\/account\/jwt":{"post":{"summary":"Create 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":18,"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":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"List Logs","operationId":"accountListLogs","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":"listLogs","weight":22,"cookies":false,"type":"","demo":"account\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Name","operationId":"accountUpdateName","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateName","weight":24,"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 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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePassword","weight":25,"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\/phone":{"patch":{"summary":"Update Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](\/docs\/client\/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePhone","weight":27,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.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":{"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["phone","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":20,"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 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":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updatePrefs","weight":28,"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":33,"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":34,"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":"List Sessions","operationId":"accountListSessions","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":"listSessions","weight":21,"cookies":false,"type":"","demo":"account\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-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":[]}]},"delete":{"summary":"Delete 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":32,"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":17,"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\/email":{"post":{"summary":"Create Email Session","operationId":"accountCreateEmailSession","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":"createEmailSession","weight":8,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.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"]}}]}},"\/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. If the provided user ID has not be registered, a new user will be created. 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":13,"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 `ID.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":14,"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 OAuth2 Session","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":9,"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, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","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. Maximum of 100 scopes are allowed, each 4096 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":15,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-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 `ID.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]"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"}},"required":["userId","phone"]}}]},"put":{"summary":"Create Phone Session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](\/docs\/client\/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":16,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-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\/{sessionId}":{"get":{"summary":"Get Session","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":23,"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 OAuth Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":31,"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 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":30,"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\/status":{"patch":{"summary":"Update Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"Account","schema":{"$ref":"#\/definitions\/account"}}},"x-appwrite":{"method":"updateStatus","weight":29,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.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\/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#accountUpdateEmailVerification). 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":35,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-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":36,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-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"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](\/docs\/client\/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":37,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number 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":"updatePhoneVerification","weight":38,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":40,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":39,"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":43,"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. Country codes follow the [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":41,"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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":42,"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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":45,"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":"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.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":44,"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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.","responses":{"200":{"description":"Databases List","schema":{"$ref":"#\/definitions\/databaseList"}}},"x-appwrite":{"method":"list","weight":47,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Database.\n","responses":{"201":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"create","weight":46,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"databaseId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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":"[DATABASE_ID]","x-global":true},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["databaseId","name"]}}]}},"\/databases\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","schema":{"$ref":"#\/definitions\/usageDatabases"}}},"x-appwrite":{"method":"getUsage","weight":80,"cookies":false,"type":"","demo":"databases\/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"}]}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.","responses":{"200":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"get","weight":48,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Update a database by its unique ID.","responses":{"200":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"update","weight":50,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_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]"}},"required":["name"]}}]},"delete":{"summary":"Delete Database","operationId":"databasesDelete","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":51,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"listCollections","weight":53,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":52,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `ID.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]"},"permissions":{"type":"array","description":"An array of permissions strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false}},"required":["collectionId","name"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":54,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"updateCollection","weight":56,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permission are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"documentSecurity":{"type":"boolean","description":"Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false},"enabled":{"type":"boolean","description":"Is collection enabled?","default":true,"x-example":false}},"required":["name"]}}]},"delete":{"summary":"Delete Collection","operationId":"databasesDeleteCollection","consumes":["application\/json"],"produces":[],"tags":["databases"],"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":57,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":67,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a boolean attribute.\n","responses":{"202":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"createBooleanAttribute","weight":65,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime":{"post":{"summary":"Create DateTime Attribute","operationId":"databasesCreateDatetimeAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"AttributeDatetime","schema":{"$ref":"#\/definitions\/attributeDatetime"}}},"x-appwrite":{"method":"createDatetimeAttribute","weight":66,"cookies":false,"type":"","demo":"databases\/create-datetime-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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 the attribute in ISO 8601 format. Cannot be set when attribute is required.","default":null,"x-example":"2020-10-15T06:38:00.000+00:00"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create an email attribute.\n","responses":{"202":{"description":"AttributeEmail","schema":{"$ref":"#\/definitions\/attributeEmail"}}},"x-appwrite":{"method":"createEmailAttribute","weight":59,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":60,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 elements are allowed, each 4096 characters long.","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeFloat","schema":{"$ref":"#\/definitions\/attributeFloat"}}},"x-appwrite":{"method":"createFloatAttribute","weight":64,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"202":{"description":"AttributeInteger","schema":{"$ref":"#\/definitions\/attributeInteger"}}},"x-appwrite":{"method":"createIntegerAttribute","weight":63,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create IP address attribute.\n","responses":{"202":{"description":"AttributeIP","schema":{"$ref":"#\/definitions\/attributeIp"}}},"x-appwrite":{"method":"createIpAttribute","weight":61,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a string attribute.\n","responses":{"202":{"description":"AttributeString","schema":{"$ref":"#\/definitions\/attributeString"}}},"x-appwrite":{"method":"createStringAttribute","weight":58,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a URL attribute.\n","responses":{"202":{"description":"AttributeURL","schema":{"$ref":"#\/definitions\/attributeUrl"}}},"x-appwrite":{"method":"createUrlAttribute","weight":62,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeDatetime, or AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeString","schema":{"x-oneOf":[{"$ref":"#\/definitions\/attributeDatetime"},{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeDatetime"},{"$ref":"#\/definitions\/attributeString"}]}}},"x-appwrite":{"method":"getAttribute","weight":68,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteAttribute","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":69,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Attribute Key.","required":true,"type":"string","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get a list of all the user's documents in a given collection. You can use the query params to filter your results.","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":75,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":74,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). 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 `ID.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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":76,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":78,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":120,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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":"{}"},"permissions":{"type":"array","description":"An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}}}}}]},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":79,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databasesListDocumentLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":77,"cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":71,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"202":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":70,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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. Maximum of 100 attributes are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":72,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","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":"databasesDeleteIndex","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":73,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Index Key.","required":true,"type":"string","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListCollectionLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"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":55,"cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","schema":{"$ref":"#\/definitions\/usageCollection"}}},"x-appwrite":{"method":"getCollectionUsage","weight":82,"cookies":false,"type":"","demo":"databases\/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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"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"}]}},"\/databases\/{databaseId}\/logs":{"get":{"summary":"List Database Logs","operationId":"databasesListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"Get the database activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":49,"cookies":false,"type":"","demo":"databases\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","schema":{"$ref":"#\/definitions\/usageDatabase"}}},"x-appwrite":{"method":"getDatabaseUsage","weight":81,"cookies":false,"type":"","demo":"databases\/get-database-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":"databaseId","description":"Database ID.","required":true,"x-global":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"range","description":"`Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/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":191,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":190,"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 `ID.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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","default":null,"x-example":"[\"any\"]","items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","default":null,"x-example":"node-14.5"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","default":true,"x-example":false}},"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":192,"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\/usage":{"get":{"summary":"Get Functions 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":195,"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":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/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":193,"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":196,"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 roles. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 64 characters long.","default":null,"x-example":"[\"any\"]","items":{"type":"string"}},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","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},"enabled":{"type":"boolean","description":"Is function enabled?","default":true,"x-example":false}},"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":198,"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":200,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: entrypoint, size, buildId, activate","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":{"202":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":199,"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":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"getDeployment","weight":201,"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":197,"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":202,"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":"Create Build","operationId":"functionsCreateBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"createBuild","weight":203,"cookies":false,"type":"","demo":"functions\/create-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-build.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"},{"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.","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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, statusCode, duration","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":"ip:{ip},userId:{userId}","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 in the background. Default value is false.","default":false,"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":"functionsGetFunctionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","schema":{"$ref":"#\/definitions\/usageFunctions"}}},"x-appwrite":{"method":"getFunctionUsage","weight":194,"cookies":false,"type":"","demo":"functions\/get-function-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"}]}},"\/functions\/{functionId}\/variables":{"get":{"summary":"List Variables","operationId":"functionsListVariables","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all variables of a specific function.","responses":{"200":{"description":"Variables List","schema":{"$ref":"#\/definitions\/variableList"}}},"x-appwrite":{"method":"listVariables","weight":208,"cookies":false,"type":"","demo":"functions\/list-variables.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-variables.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]},"post":{"summary":"Create Variable","operationId":"functionsCreateVariable","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Create a new function variable. These variables can be accessed within function in the `env` object under the request variable.","responses":{"201":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"createVariable","weight":207,"cookies":false,"type":"","demo":"functions\/create-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","default":null,"x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","default":null,"x-example":"[VALUE]"}},"required":["key","value"]}}]}},"\/functions\/{functionId}\/variables\/{variableId}":{"get":{"summary":"Get Variable","operationId":"functionsGetVariable","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a variable by its unique ID.","responses":{"200":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"getVariable","weight":209,"cookies":false,"type":"","demo":"functions\/get-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"type":"string","x-example":"[VARIABLE_ID]","in":"path"}]},"put":{"summary":"Update Variable","operationId":"functionsUpdateVariable","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update variable by its unique ID.","responses":{"200":{"description":"Variable","schema":{"$ref":"#\/definitions\/variable"}}},"x-appwrite":{"method":"updateVariable","weight":210,"cookies":false,"type":"","demo":"functions\/update-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"type":"string","x-example":"[VARIABLE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Variable key. Max length: 255 chars.","default":null,"x-example":"[KEY]"},"value":{"type":"string","description":"Variable value. Max length: 8192 chars.","default":null,"x-example":"[VALUE]"}},"required":["key"]}}]},"delete":{"summary":"Delete Variable","operationId":"functionsDeleteVariable","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a variable by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteVariable","weight":211,"cookies":false,"type":"","demo":"functions\/delete-variable.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-variable.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 unique ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"variableId","description":"Variable unique ID.","required":true,"type":"string","x-example":"[VARIABLE_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":90,"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":102,"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 servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getCache","weight":93,"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 servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":92,"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\/pubsub":{"get":{"summary":"Get PubSub","operationId":"healthGetPubSub","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite pub-sub servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getPubSub","weight":95,"cookies":false,"type":"","demo":"health\/get-pub-sub.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.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":{"get":{"summary":"Get Queue","operationId":"healthGetQueue","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite queue messaging servers are up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getQueue","weight":94,"cookies":false,"type":"","demo":"health\/get-queue.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.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":99,"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":100,"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":98,"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\/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":97,"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":101,"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":96,"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":83,"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":"localeListContinents","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":"listContinents","weight":87,"cookies":false,"type":"","demo":"locale\/list-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountries","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":"listCountries","weight":84,"cookies":false,"type":"","demo":"locale\/list-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesEU","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":"listCountriesEU","weight":85,"cookies":false,"type":"","demo":"locale\/list-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCountriesPhones","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":"listCountriesPhones","weight":86,"cookies":false,"type":"","demo":"locale\/list-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListCurrencies","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":"listCurrencies","weight":88,"cookies":false,"type":"","demo":"locale\/list-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":"localeListLanguages","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":"listLanguages","weight":89,"cookies":false,"type":"","demo":"locale\/list-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-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":[]}]}},"\/project\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["project"],"description":"","responses":{"200":{"description":"UsageProject","schema":{"$ref":"#\/definitions\/usageProject"}}},"x-appwrite":{"method":"getUsage","weight":135,"cookies":false,"type":"","demo":"project\/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":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/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":105,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":104,"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 `ID.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]"},"region":{"type":"string","description":"Project Region.","default":"default","x-example":"default"},"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":106,"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":107,"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":113,"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\/duration":{"patch":{"summary":"Update Project Authentication Duration","operationId":"projectsUpdateAuthDuration","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthDuration","weight":111,"cookies":false,"type":"","demo":"projects\/update-auth-duration.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":{"duration":{"type":"integer","description":"Project session length in seconds. Max length: 31536000 seconds.","default":null,"x-example":0}},"required":["duration"]}}]}},"\/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":110,"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":112,"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":131,"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":130,"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":132,"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":134,"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":133,"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":121,"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":120,"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. Maximum of 100 scopes are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","default":null,"x-example":"2020-10-15T06:38:00.000+00:00"}},"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":122,"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":123,"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. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"expire":{"type":"string","description":"Expiration time in ISO 8601 format. Use null for unlimited expiration.","default":null,"x-example":"2020-10-15T06:38:00.000+00:00"}},"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":124,"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":109,"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":null,"x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","default":null,"x-example":"[SECRET]"},"enabled":{"type":"boolean","description":"Provider status. Set to 'false' to disable new session creation.","default":null,"x-example":false}},"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":126,"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":125,"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":null}},"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":127,"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":128,"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":null}},"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":129,"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":108,"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}\/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":115,"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":114,"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. Maximum of 100 events are allowed.","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":116,"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":117,"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. Maximum of 100 events are allowed.","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":119,"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"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhookSignature","weight":118,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.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":137,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":136,"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 `ID.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]"},"permissions":{"type":"array","description":"An array of permission strings. By default no user is granted with any permissions. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","default":"none","x-example":"none"},"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"]}}]}},"\/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":138,"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":139,"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]"},"permissions":{"type":"array","description":"An array of permission strings. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","items":{"type":"string"}},"fileSecurity":{"type":"boolean","description":"Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](\/docs\/permissions).","default":false,"x-example":false},"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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","default":[],"x-example":null,"items":{"type":"string"}},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Can be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd), For file size above 20MB compression is skipped even if it's enabled","default":"none","x-example":"none"},"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"]}}]},"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":140,"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.","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":142,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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\/storage#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":141,"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":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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 `ID.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":"permissions","description":"An array of permission strings. By default the current user is granted with all permissions. [Learn more about permissions](\/docs\/permissions).","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"read(\"any\")\"]","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":143,"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":147,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":{"permissions":{"type":"array","description":"An array of permission string. By default the current permissions are inherited. [Learn more about permissions](\/docs\/permissions).","default":null,"x-example":"[\"read(\"any\")\"]","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":148,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":60,"rate-time":60,"rate-key":"ip:{ip},method:{method},url:{url},userId:{userId}","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":145,"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":144,"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":146,"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":150,"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 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":149,"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.","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":152,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":151,"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 `ID.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). Maximum of 100 roles are allowed, each 32 characters long.","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":153,"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":154,"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":155,"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}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":162,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_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\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"List Team Memberships","operationId":"teamsListMemberships","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":"listMemberships","weight":157,"cookies":false,"type":"","demo":"teams\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":156,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"getMembership","weight":158,"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":159,"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). Maximum of 100 roles are allowed, each 32 characters long.","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":161,"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":160,"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":171,"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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"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"}]},"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":163,"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 `ID.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"},"phone":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":"+12065550100"},"password":{"type":"string","description":"Plain text 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"]}}]}},"\/users\/argon2":{"post":{"summary":"Create User with Argon2 Password","operationId":"usersCreateArgon2User","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createArgon2User","weight":166,"cookies":false,"type":"","demo":"users\/create-argon2user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-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 `ID.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 hashed using Argon2.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/bcrypt":{"post":{"summary":"Create User with Bcrypt Password","operationId":"usersCreateBcryptUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createBcryptUser","weight":164,"cookies":false,"type":"","demo":"users\/create-bcrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-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 `ID.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 hashed using Bcrypt.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/md5":{"post":{"summary":"Create User with MD5 Password","operationId":"usersCreateMD5User","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createMD5User","weight":165,"cookies":false,"type":"","demo":"users\/create-m-d5user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-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 `ID.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 hashed using MD5.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/phpass":{"post":{"summary":"Create User with PHPass Password","operationId":"usersCreatePHPassUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createPHPassUser","weight":168,"cookies":false,"type":"","demo":"users\/create-p-h-pass-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-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 `ID.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 hashed using PHPass.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/scrypt":{"post":{"summary":"Create User with Scrypt Password","operationId":"usersCreateScryptUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createScryptUser","weight":169,"cookies":false,"type":"","demo":"users\/create-scrypt-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-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 `ID.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 hashed using Scrypt.","default":null,"x-example":"password"},"passwordSalt":{"type":"string","description":"Optional salt used to hash password.","default":null,"x-example":"[PASSWORD_SALT]"},"passwordCpu":{"type":"integer","description":"Optional CPU cost used to hash password.","default":null,"x-example":null},"passwordMemory":{"type":"integer","description":"Optional memory cost used to hash password.","default":null,"x-example":null},"passwordParallel":{"type":"integer","description":"Optional parallelization cost used to hash password.","default":null,"x-example":null},"passwordLength":{"type":"integer","description":"Optional hash length used to hash password.","default":null,"x-example":null},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordCpu","passwordMemory","passwordParallel","passwordLength"]}}]}},"\/users\/scrypt-modified":{"post":{"summary":"Create User with Scrypt Modified Password","operationId":"usersCreateScryptModifiedUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createScryptModifiedUser","weight":170,"cookies":false,"type":"","demo":"users\/create-scrypt-modified-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-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 `ID.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 hashed using Scrypt Modified.","default":null,"x-example":"password"},"passwordSalt":{"type":"string","description":"Salt used to hash password.","default":null,"x-example":"[PASSWORD_SALT]"},"passwordSaltSeparator":{"type":"string","description":"Salt separator used to hash password.","default":null,"x-example":"[PASSWORD_SALT_SEPARATOR]"},"passwordSignerKey":{"type":"string","description":"Signer key used to hash password.","default":null,"x-example":"[PASSWORD_SIGNER_KEY]"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password","passwordSalt","passwordSaltSeparator","passwordSignerKey"]}}]}},"\/users\/sha":{"post":{"summary":"Create User with SHA Password","operationId":"usersCreateSHAUser","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"createSHAUser","weight":167,"cookies":false,"type":"","demo":"users\/create-s-h-a-user.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-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 `ID.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 hashed using SHA.","default":null,"x-example":"password"},"passwordVersion":{"type":"string","description":"Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'","default":"","x-example":"sha1"},"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":189,"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"}]}},"\/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":172,"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, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":188,"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":182,"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":"List User Logs","operationId":"usersListLogs","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":"listLogs","weight":176,"cookies":false,"type":"","demo":"users\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Only supported methods are limit and offset","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"List User Memberships","operationId":"usersListMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"listMemberships","weight":175,"cookies":false,"type":"","demo":"users\/list-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.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"}]}},"\/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":180,"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":181,"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}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":183,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.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":{"number":{"type":"string","description":"User phone number.","default":null,"x-example":"+12065550100"}},"required":["number"]}}]}},"\/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":173,"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":185,"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":"List User Sessions","operationId":"usersListSessions","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":"listSessions","weight":174,"cookies":false,"type":"","demo":"users\/list-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-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":187,"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":186,"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. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":177,"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":"usersUpdateEmailVerification","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":"updateEmailVerification","weight":184,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-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"]}}]}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":179,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-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":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account.","x-globalAttributes":[]},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.","x-globalAttributes":[]},{"name":"databases","description":"The Databases service allows you to create structured collections of documents, query and filter lists of documents","x-globalAttributes":["databaseId"]},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location.","x-globalAttributes":[]},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health.","x-globalAttributes":[]},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"project","description":"The Project service allows you to manage all the projects in your Appwrite server.","x-globalAttributes":[]},{"name":"storage","description":"The Storage service allows you to manage your project files.","x-globalAttributes":[]},{"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","x-globalAttributes":[]},{"name":"users","description":"The Users service allows you to manage your project users.","x-globalAttributes":[]},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions.","x-globalAttributes":[]}],"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"]},"databaseList":{"description":"Databases List","type":"object","properties":{"total":{"type":"integer","description":"Total number of databases documents that matched your query.","x-example":5,"format":"int32"},"databases":{"type":"array","description":"List of databases.","items":{"type":"object","$ref":"#\/definitions\/database"},"x-example":""}},"required":["total","databases"]},"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"]},"variableList":{"description":"Variables List","type":"object","properties":{"total":{"type":"integer","description":"Total number of variables documents that matched your query.","x-example":5,"format":"int32"},"variables":{"type":"array","description":"List of variables.","items":{"type":"object","$ref":"#\/definitions\/variable"},"x-example":""}},"required":["total","variables"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"},"$createdAt":{"type":"string","description":"Database creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Database update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","name","$createdAt","$updatedAt"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Collection creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Collection update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Collection permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"documentSecurity":{"type":"boolean","description":"Whether document-level permissions are enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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\/attributeDatetime"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$permissions","databaseId","name","enabled","documentSecurity","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\/attributeDatetime"},{"$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"]},"attributeDatetime":{"description":"AttributeDatetime","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"birthDay"},"type":{"type":"string","description":"Attribute type.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"ISO 8601 format.","x-example":"datetime"},"default":{"type":"string","description":"Default value for attribute when not provided. Only null is optional","x-example":"2020-10-15T06:38:00.000+00:00","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":[],"x-nullable":true}},"required":["key","type","status","attributes"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collectionId":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"string","description":"Document creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Document update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Document permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]}},"additionalProperties":true,"required":["$id","$collectionId","$databaseId","$createdAt","$updatedAt","$permissions"]},"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":"string","description":"Log creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"password":{"type":"string","description":"Hashed user password.","x-example":"$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE"},"hash":{"type":"string","description":"Password hashing algorithm.","x-example":"argon2"},"hashOptions":{"type":"object","description":"Password hashing algorithm configuration.","x-example":{},"items":{"x-oneOf":[{"$ref":"#\/definitions\/algoArgon2"},{"$ref":"#\/definitions\/algoScrypt"},{"$ref":"#\/definitions\/algoScryptModified"},{"$ref":"#\/definitions\/algoBcrypt"},{"$ref":"#\/definitions\/algoPhpass"},{"$ref":"#\/definitions\/algoSha"},{"$ref":"#\/definitions\/algoMd5"}]}},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","password","hash","hashOptions","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"algoMd5":{"description":"AlgoMD5","type":"object"},"algoSha":{"description":"AlgoSHA","type":"object"},"algoPhpass":{"description":"AlgoPHPass","type":"object"},"algoBcrypt":{"description":"AlgoBcrypt","type":"object"},"algoScrypt":{"description":"AlgoScrypt","type":"object","properties":{"costCpu":{"type":"integer","description":"CPU complexity of computed hash.","x-example":8,"format":"int32"},"costMemory":{"type":"integer","description":"Memory complexity of computed hash.","x-example":14,"format":"int32"},"costParallel":{"type":"integer","description":"Parallelization of computed hash.","x-example":1,"format":"int32"},"length":{"type":"integer","description":"Length used to compute hash.","x-example":64,"format":"int32"}},"required":["costCpu","costMemory","costParallel","length"]},"algoScryptModified":{"description":"AlgoScryptModified","type":"object","properties":{"salt":{"type":"string","description":"Salt used to compute hash.","x-example":"UxLMreBr6tYyjQ=="},"saltSeparator":{"type":"string","description":"Separator used to compute hash.","x-example":"Bw=="},"signerKey":{"type":"string","description":"Key used to compute hash.","x-example":"XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ=="}},"required":["salt","saltSeparator","signerKey"]},"algoArgon2":{"description":"AlgoArgon2","type":"object","properties":{"memoryCost":{"type":"integer","description":"Memory used to compute hash.","x-example":65536,"format":"int32"},"timeCost":{"type":"integer","description":"Amount of time consumed to compute hash","x-example":4,"format":"int32"},"threads":{"type":"integer","description":"Number of threads used to compute hash.","x-example":3,"format":"int32"}},"required":["memoryCost","timeCost","threads"]},"account":{"description":"Account","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"User creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"User update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"string","description":"User registration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"string","description":"Password update time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone 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","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Session creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"string","description":"Session expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"The date of when the access token expires in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","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"},"$createdAt":{"type":"string","description":"Token creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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":"string","description":"Token expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["$id","$createdAt","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"},"$createdAt":{"type":"string","description":"File creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"File update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"File permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"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","$createdAt","$updatedAt","$permissions","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Bucket creation time in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Bucket update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Bucket permissions. [Learn more about permissions](\/docs\/permissions).","items":{"type":"string"},"x-example":["read(\"any\")"]},"fileSecurity":{"type":"boolean","description":"Whether file-level security is enabled. [Learn more about permissions](\/docs\/permissions).","x-example":true},"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"]},"compression":{"type":"string","description":"Compression algorithm choosen for compression. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).","x-example":"gzip"},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$createdAt","$updatedAt","$permissions","fileSecurity","name","enabled","maximumFileSize","allowedFileExtensions","compression","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Team creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Team update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Membership creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Membership update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"invited":{"type":"string","description":"Date, the user has been invited to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"joined":{"type":"string","description":"Date, the user has accepted the invitation to join the team in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Function creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Function update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"users"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"enabled":{"type":"boolean","description":"Function enabled.","x-example":false},"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":"array","description":"Function variables.","items":{"type":"object","$ref":"#\/definitions\/variable"},"x-example":[]},"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 * * *"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","execute","name","enabled","runtime","deployment","vars","events","schedule","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"},"$createdAt":{"type":"string","description":"Deployment creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Deployment update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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. Possible values are \"processing\", \"building\", \"pending\", \"ready\", and \"failed\".","x-example":"ready"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"},"buildTime":{"type":"integer","description":"The current build time in seconds.","x-example":128,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr","buildTime"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Execution creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Execution upate date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$permissions":{"type":"array","description":"Execution roles.","items":{"type":"string"},"x-example":["any"]},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response output.","x-example":""},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"duration":{"type":"number","description":"The script execution duration in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$createdAt","$updatedAt","$permissions","functionId","trigger","status","statusCode","response","stdout","stderr","duration"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Project creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Project update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"authDuration":{"type":"integer","description":"Session duration in seconds.","x-example":60,"format":"int32"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"providers":{"type":"array","description":"List of Providers.","items":{"type":"object","$ref":"#\/definitions\/provider"},"x-example":{}},"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":{}},"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},"serviceStatusForDatabases":{"type":"boolean","description":"Databases 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","$createdAt","$updatedAt","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authDuration","authLimit","providers","platforms","webhooks","keys","domains","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Webhook creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Webhook update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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"},"signatureKey":{"type":"string","description":"Signature key which can be used to validated incoming","x-example":"ad3d581ca230e2b7059c545e5a"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Key creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Key update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"expire":{"type":"string","description":"Key expiration date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"},"accessedAt":{"type":"string","description":"Most recent access date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"sdks":{"type":"array","description":"List of SDK user agents that used this key.","items":{"type":"string"},"x-example":"appwrite:flutter"}},"required":["$id","$createdAt","$updatedAt","name","expire","scopes","secret","accessedAt","sdks"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Domain creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Domain update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"provider":{"description":"Provider","type":"object","properties":{"name":{"type":"string","description":"Provider name.","x-example":"GitHub"},"appId":{"type":"string","description":"OAuth 2.0 application ID.","x-example":"259125845563242502"},"secret":{"type":"string","description":"OAuth 2.0 application secret. Might be JSON string if provider requires extra configuration.","x-example":"Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ"},"enabled":{"type":"boolean","description":"Provider is active and can be used to create session.","x-example":""}},"required":["name","appId","secret","enabled"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Platform creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Platform update date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"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","$createdAt","$updatedAt","name","type","key","store","hostname","httpUser","httpPass"]},"variable":{"description":"Variable","type":"object","properties":{"$id":{"type":"string","description":"Variable ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"$updatedAt":{"type":"string","description":"Variable creation date in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"},"key":{"type":"string","description":"Variable key.","x-example":"API_KEY"},"value":{"type":"string","description":"Variable value.","x-example":"myPa$$word1"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"}},"required":["$id","$createdAt","$updatedAt","key","value","functionId"]},"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":{"name":{"type":"string","description":"Name of the service.","x-example":"database"},"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":["name","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"]},"metric":{"description":"Metric","type":"object","properties":{"value":{"type":"integer","description":"The value of this metric at the timestamp.","x-example":1,"format":"int32"},"date":{"type":"string","description":"The date at which this metric was aggregated in ISO 8601 format.","x-example":"2020-10-15T06:38:00.000+00:00"}},"required":["value","date"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","databasesTotal","collectionsTotal","documentsTotal"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"collectionsTotal":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","collectionsTotal","documentsTotal"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsTotal":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","documentsTotal"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersTotal":{"type":"array","description":"Aggregated stats for total number of users.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"sessionsTotal":{"type":"array","description":"Aggregated stats for sessions created.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","usersTotal","sessionsTotal"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"bucketsTotal":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","bucketsTotal","filesTotal","filesStorage"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesTotal":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","filesTotal","filesStorage"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsTotal":{"type":"array","description":"Aggregated stats for number of functions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"deploymentsTotal":{"type":"array","description":"Aggregated stats for number of function deployments.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"deploymentsStorage":{"type":"array","description":"Aggregated stats for function deployments storage.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsTotal":{"type":"array","description":"Aggregated stats for number of function builds.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsStorage":{"type":"array","description":"Aggregated stats for builds storage.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"buildsTime":{"type":"array","description":"Aggregated stats for function build compute.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for number of function executions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsTime":{"type":"array","description":"Aggregated stats for function execution compute.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","functionsTotal","deploymentsTotal","deploymentsStorage","buildsTotal","buildsStorage","buildsTime","executionsTotal","executionsTime"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requestsTotal":{"type":"array","description":"Aggregated stats for number of requests.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"executionsTotal":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"documentsTotal":{"type":"array","description":"Aggregated stats for number of documents.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"databasesTotal":{"type":"array","description":"Aggregated stats for number of databases.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"usersTotal":{"type":"array","description":"Aggregated stats for number of users.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]},"bucketsTotal":{"type":"array","description":"Aggregated stats for number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":[]}},"required":["range","requestsTotal","network","executionsTotal","documentsTotal","databasesTotal","usersTotal","filesStorage","bucketsTotal"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/workers/audits.php b/app/workers/audits.php index 90ac02053..8e9b7bb11 100644 --- a/app/workers/audits.php +++ b/app/workers/audits.php @@ -39,6 +39,7 @@ class AuditsV1 extends Worker $dbForProject = $this->getProjectDB($project); $audit = new Audit($dbForProject); $audit->log( + userInternalId: $user->getInternalId(), userId: $user->getId(), // Pass first, most verbose event pattern event: $event, From bb98033aed7b52b961512cb9d9191e6230c908d1 Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 15 Feb 2023 11:21:31 +0200 Subject: [PATCH 90/94] few last updates --- CHANGES.md | 1 + src/Appwrite/Migration/Version/V17.php | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index c2121c80e..4a9895379 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,7 @@ - Deprecated influxdb, telegraf containers and removed all of their occurrences from the code. - Removed _APP_INFLUXDB_HOST, _APP_INFLUXDB_PORT, _APP_STATSD_HOST, _APP_STATSD_PORT env variables. - Removed usage labels dependency. + - Dropped type attribute from stats collection. - Usage metrics are processed via new usage worker. - Metrics changes: - Storage diff --git a/src/Appwrite/Migration/Version/V17.php b/src/Appwrite/Migration/Version/V17.php index f841fcab5..ea149c1ac 100644 --- a/src/Appwrite/Migration/Version/V17.php +++ b/src/Appwrite/Migration/Version/V17.php @@ -99,6 +99,18 @@ class V17 extends Migration } break; + case 'stats': + try { + /** + * Delete 'type' attribute + */ + $this->projectDB->deleteAttribute($id, 'type'); + $this->projectDB->deleteCachedCollection($id); + } catch (\Throwable $th) { + Console::warning("'type' from {$id}: {$th->getMessage()}"); + } + break; + case 'schedules': try { /** From df2e7ca7e18d70859d88301329582830cfaa5c1d Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 15 Feb 2023 20:40:42 +0200 Subject: [PATCH 91/94] few last updates --- app/controllers/shared/api.php | 185 ++++++++++++++------------------- composer.json | 3 +- 2 files changed, 81 insertions(+), 107 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 9eda79766..fa36a6dcf 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -57,120 +57,95 @@ $databaseListener = function (string $event, Document $document, Document $proje $value = -1; } - try { - switch (true) { - case $document->getCollection() === 'teams': + switch (true) { + case $document->getCollection() === 'teams': + $queueForUsage + ->addMetric(METRIC_TEAMS, $value); // per project + break; + case $document->getCollection() === 'users': + $queueForUsage + ->addMetric(METRIC_USERS, $value); // per project + if ($event === Database::EVENT_DOCUMENT_DELETE) { $queueForUsage - ->addMetric(METRIC_TEAMS, $value); // per project - break; - case $document->getCollection() === 'users': - $queueForUsage - ->addMetric(METRIC_USERS, $value); // per project - if ($event === Database::EVENT_DOCUMENT_DELETE) { - $queueForUsage - ->addReduce($document); - } - break; - case $document->getCollection() === 'sessions': // sessions - $queueForUsage - ->addMetric(METRIC_SESSIONS, $value); //per project - break; - case $document->getCollection() === 'databases': // databases - $queueForUsage - ->addMetric(METRIC_DATABASES, $value); // per project + ->addReduce($document); + } + break; + case $document->getCollection() === 'sessions': // sessions + $queueForUsage + ->addMetric(METRIC_SESSIONS, $value); //per project + break; + case $document->getCollection() === 'databases': // databases + $queueForUsage + ->addMetric(METRIC_DATABASES, $value); // per project - if ($event === Database::EVENT_DOCUMENT_DELETE) { - $queueForUsage - ->addReduce($document); - } - break; - case str_starts_with($document->getCollection(), 'database_') && !str_contains($document->getCollection(), 'collection'): //collections - $parts = explode('_', $document->getCollection()); - $databaseInternalId = $parts[1] ?? 0; + if ($event === Database::EVENT_DOCUMENT_DELETE) { $queueForUsage - ->addMetric(METRIC_COLLECTIONS, $value) // per project - ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, METRIC_DATABASE_ID_COLLECTIONS), $value) // per database - ; + ->addReduce($document); + } + break; + case str_starts_with($document->getCollection(), 'database_') && !str_contains($document->getCollection(), 'collection'): //collections + $parts = explode('_', $document->getCollection()); + $databaseInternalId = $parts[1] ?? 0; + $queueForUsage + ->addMetric(METRIC_COLLECTIONS, $value) // per project + ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, METRIC_DATABASE_ID_COLLECTIONS), $value) // per database + ; - if ($event === Database::EVENT_DOCUMENT_DELETE) { - $queueForUsage - ->addReduce($document); - } - break; - case str_starts_with($document->getCollection(), 'database_') && str_contains($document->getCollection(), '_collection_'): //documents - $parts = explode('_', $document->getCollection()); - $databaseInternalId = $parts[1] ?? 0; - $collectionInternalId = $parts[3] ?? 0; + if ($event === Database::EVENT_DOCUMENT_DELETE) { $queueForUsage - ->addMetric(METRIC_DOCUMENTS, $value) // per project - ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, METRIC_DATABASE_ID_DOCUMENTS), $value) // per database - ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $collectionInternalId], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), $value); // per collection - break; - case $document->getCollection() === 'buckets': //buckets + ->addReduce($document); + } + break; + case str_starts_with($document->getCollection(), 'database_') && str_contains($document->getCollection(), '_collection_'): //documents + $parts = explode('_', $document->getCollection()); + $databaseInternalId = $parts[1] ?? 0; + $collectionInternalId = $parts[3] ?? 0; + $queueForUsage + ->addMetric(METRIC_DOCUMENTS, $value) // per project + ->addMetric(str_replace('{databaseInternalId}', $databaseInternalId, METRIC_DATABASE_ID_DOCUMENTS), $value) // per database + ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$databaseInternalId, $collectionInternalId], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), $value); // per collection + break; + case $document->getCollection() === 'buckets': //buckets + $queueForUsage + ->addMetric(METRIC_BUCKETS, $value); // per project + if ($event === Database::EVENT_DOCUMENT_DELETE) { $queueForUsage - ->addMetric(METRIC_BUCKETS, $value); // per project - if ($event === Database::EVENT_DOCUMENT_DELETE) { - $queueForUsage - ->addReduce($document); - } - break; - case str_starts_with($document->getCollection(), 'bucket_'): // files - $parts = explode('_', $document->getCollection()); - $bucketInternalId = $parts[1]; - $queueForUsage - ->addMetric(METRIC_FILES, $value) // per project - ->addMetric(METRIC_FILES_STORAGE, $document->getAttribute('sizeOriginal') * $value) // per project - ->addMetric(str_replace('{bucketInternalId}', $bucketInternalId, METRIC_BUCKET_ID_FILES), $value) // per bucket - ->addMetric(str_replace('{bucketInternalId}', $bucketInternalId, METRIC_BUCKET_ID_FILES_STORAGE), $document->getAttribute('sizeOriginal') * $value); // per bucket - break; - case $document->getCollection() === 'functions': - $queueForUsage - ->addMetric(METRIC_FUNCTIONS, $value); // per project + ->addReduce($document); + } + break; + case str_starts_with($document->getCollection(), 'bucket_'): // files + $parts = explode('_', $document->getCollection()); + $bucketInternalId = $parts[1]; + $queueForUsage + ->addMetric(METRIC_FILES, $value) // per project + ->addMetric(METRIC_FILES_STORAGE, $document->getAttribute('sizeOriginal') * $value) // per project + ->addMetric(str_replace('{bucketInternalId}', $bucketInternalId, METRIC_BUCKET_ID_FILES), $value) // per bucket + ->addMetric(str_replace('{bucketInternalId}', $bucketInternalId, METRIC_BUCKET_ID_FILES_STORAGE), $document->getAttribute('sizeOriginal') * $value); // per bucket + break; + case $document->getCollection() === 'functions': + $queueForUsage + ->addMetric(METRIC_FUNCTIONS, $value); // per project - if ($event === Database::EVENT_DOCUMENT_DELETE) { - $queueForUsage - ->addReduce($document); - } - break; - case $document->getCollection() === 'deployments': + if ($event === Database::EVENT_DOCUMENT_DELETE) { $queueForUsage - ->addMetric(METRIC_DEPLOYMENTS, $value) // per project - ->addMetric(METRIC_DEPLOYMENTS_STORAGE, $document->getAttribute('size') * $value) // per project - ->addMetric(str_replace(['{resourceType}', '{resourceInternalId}'], [$document->getAttribute('resourceType'), $document->getAttribute('resourceInternalId')], METRIC_FUNCTION_ID_DEPLOYMENTS), $value)// per function - ->addMetric(str_replace(['{resourceType}', '{resourceInternalId}'], [$document->getAttribute('resourceType'), $document->getAttribute('resourceInternalId')], METRIC_FUNCTION_ID_DEPLOYMENTS_STORAGE), $document->getAttribute('size') * $value);// per function + ->addReduce($document); + } + break; + case $document->getCollection() === 'deployments': + $queueForUsage + ->addMetric(METRIC_DEPLOYMENTS, $value) // per project + ->addMetric(METRIC_DEPLOYMENTS_STORAGE, $document->getAttribute('size') * $value) // per project + ->addMetric(str_replace(['{resourceType}', '{resourceInternalId}'], [$document->getAttribute('resourceType'), $document->getAttribute('resourceInternalId')], METRIC_FUNCTION_ID_DEPLOYMENTS), $value)// per function + ->addMetric(str_replace(['{resourceType}', '{resourceInternalId}'], [$document->getAttribute('resourceType'), $document->getAttribute('resourceInternalId')], METRIC_FUNCTION_ID_DEPLOYMENTS_STORAGE), $document->getAttribute('size') * $value);// per function - break; - case $document->getCollection() === 'executions': - $queueForUsage - ->addMetric(METRIC_EXECUTIONS, $value) // per project - ->addMetric(str_replace('{functionInternalId}', $document->getAttribute('functionInternalId'), METRIC_FUNCTION_ID_EXECUTIONS), $value);// per function - break; - default: - break; - } - } catch (Throwable $error) { - if (!empty($logger)) { - $log = new Log(); - $isProduction = App::getEnv('_APP_ENV', 'development') === 'production'; - $log - ->setNamespace("appwrite-stats-api") - ->setServer(\gethostname()) - ->setVersion(App::getEnv('_APP_VERSION', 'UNKNOWN')) - ->setType(Log::TYPE_ERROR) - ->setMessage($error->getMessage()) - ->setAction('appwrite-queue-usage') - ->addTag('verboseType', get_class($error)) - ->addTag('code', $error->getCode()) - ->addExtra('event', $event) - ->addExtra('collection', $document->getCollection()) - ->addExtra('file', $error->getFile()) - ->addExtra('line', $error->getLine()) - ->addExtra('trace', $error->getTraceAsString()) - ->addExtra('detailedTrace', $error->getTrace()) - ->addExtra('roles', \Utopia\Database\Validator\Authorization::$roles) - ->setEnvironment($isProduction ? Log::ENVIRONMENT_PRODUCTION : Log::ENVIRONMENT_STAGING); - $logger->addLog($log); - } + break; + case $document->getCollection() === 'executions': + $queueForUsage + ->addMetric(METRIC_EXECUTIONS, $value) // per project + ->addMetric(str_replace('{functionInternalId}', $document->getAttribute('functionInternalId'), METRIC_FUNCTION_ID_EXECUTIONS), $value);// per function + break; + default: + break; } }; diff --git a/composer.json b/composer.json index 63504def3..65e7875e0 100644 --- a/composer.json +++ b/composer.json @@ -71,8 +71,7 @@ "dragonmantank/cron-expression": "3.3.1", "phpmailer/phpmailer": "6.6.0", "chillerlan/php-qrcode": "4.3.3", - "adhocore/jwt": "1.1.2", - "slickdeals/statsd": "3.1.0" + "adhocore/jwt": "1.1.2" }, "repositories": [ { From a2de6bb0929e9219b43077901a77be849dd1a903 Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 15 Feb 2023 20:42:19 +0200 Subject: [PATCH 92/94] few last updates --- composer.lock | 58 +-------------------------------------------------- 1 file changed, 1 insertion(+), 57 deletions(-) diff --git a/composer.lock b/composer.lock index 75fa3c7cc..6247675f9 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": "3f126c671dad4d5dca48b41a8171ac92", + "content-hash": "09028869387867b99924475970b7dd23", "packages": [ { "name": "adhocore/jwt", @@ -998,62 +998,6 @@ }, "time": "2020-04-16T16:39:50+00:00" }, - { - "name": "slickdeals/statsd", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/Slickdeals/statsd-php.git", - "reference": "225588a0a079e145359049f6e5e23eedb1b4c17f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Slickdeals/statsd-php/zipball/225588a0a079e145359049f6e5e23eedb1b4c17f", - "reference": "225588a0a079e145359049f6e5e23eedb1b4c17f", - "shasum": "" - }, - "require": { - "php": ">= 7.3 || ^8" - }, - "replace": { - "domnikl/statsd": "self.version" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.0", - "phpunit/phpunit": "^9", - "vimeo/psalm": "^4.6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Domnikl\\Statsd\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dominik Liebler", - "email": "liebler.dominik@gmail.com" - } - ], - "description": "a PHP client for statsd", - "homepage": "https://github.com/Slickdeals/statsd-php", - "keywords": [ - "Metrics", - "monitoring", - "statistics", - "statsd", - "udp" - ], - "support": { - "issues": "https://github.com/Slickdeals/statsd-php/issues", - "source": "https://github.com/Slickdeals/statsd-php/tree/3.1.0" - }, - "time": "2021-06-04T20:33:46+00:00" - }, { "name": "symfony/polyfill-php80", "version": "v1.27.0", From 3533f56337f7a01cf22fec4a0edcb8b1bdd82b3c Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 15 Feb 2023 21:14:26 +0200 Subject: [PATCH 93/94] few last updates --- app/controllers/shared/api.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index fa36a6dcf..239e6983a 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -21,8 +21,6 @@ use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; -use Utopia\Logger\Log; -use Utopia\Logger\Logger; $parseLabel = function (string $label, array $responsePayload, array $requestParams, Document $user) { preg_match_all('/{(.*?)}/', $label, $matches); @@ -50,7 +48,7 @@ $parseLabel = function (string $label, array $responsePayload, array $requestPar return $label; }; -$databaseListener = function (string $event, Document $document, Document $project, Usage $queueForUsage, Database $dbForProject, Logger|null $logger) { +$databaseListener = function (string $event, Document $document, Document $project, Usage $queueForUsage, Database $dbForProject) { $value = 1; if ($event === Database::EVENT_DOCUMENT_DELETE) { @@ -163,9 +161,8 @@ App::init() ->inject('database') ->inject('dbForProject') ->inject('queueForUsage') - ->inject('logger') ->inject('mode') - ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $events, Audit $audits, Mail $mails, Delete $deletes, EventDatabase $database, Database $dbForProject, Usage $queueForUsage, Logger|null $logger, string $mode) use ($databaseListener) { + ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $events, Audit $audits, Mail $mails, Delete $deletes, EventDatabase $database, Database $dbForProject, Usage $queueForUsage, string $mode) use ($databaseListener) { $route = $utopia->match($request); @@ -255,8 +252,8 @@ App::init() $database->setProject($project); $dbForProject - ->on(Database::EVENT_DOCUMENT_CREATE, fn ($event, $document) => $databaseListener($event, $document, $project, $queueForUsage, $dbForProject, $logger)) - ->on(Database::EVENT_DOCUMENT_DELETE, fn ($event, $document) => $databaseListener($event, $document, $project, $queueForUsage, $dbForProject, $logger)) + ->on(Database::EVENT_DOCUMENT_CREATE, fn ($event, $document) => $databaseListener($event, $document, $project, $queueForUsage, $dbForProject)) + ->on(Database::EVENT_DOCUMENT_DELETE, fn ($event, $document) => $databaseListener($event, $document, $project, $queueForUsage, $dbForProject)) ; $useCache = $route->getLabel('cache', false); From d1153ee0d77bec730617e58a682a6603f867a8e6 Mon Sep 17 00:00:00 2001 From: Shimon Newman Date: Wed, 15 Feb 2023 21:20:25 +0200 Subject: [PATCH 94/94] Update docker-compose.yml Co-authored-by: Christy Jacob --- docker-compose.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 05eb75f19..c873ae69d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -823,6 +823,3 @@ volumes: appwrite-functions: appwrite-builds: appwrite-config: - - -