diff --git a/app/config/platforms.php b/app/config/platforms.php index 5932577501..35e03c7a44 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -30,7 +30,7 @@ return [ [ 'key' => 'flutter', 'name' => 'Flutter', - 'version' => '0.2.3', + 'version' => '0.3.0-dev.1', 'url' => 'https://github.com/appwrite/sdk-for-flutter', 'enabled' => true, 'beta' => true, @@ -45,7 +45,7 @@ return [ [ 'key' => 'flutter-dev', 'name' => 'Flutter (Dev Channel)', - 'version' => '0.2.3', + 'version' => '0.3.2', 'url' => 'https://github.com/appwrite/sdk-for-flutter-dev', 'enabled' => true, 'beta' => true, diff --git a/app/config/specs/0.6.2.client.json b/app/config/specs/0.6.2.client.json new file mode 100644 index 0000000000..6524743bca --- /dev/null +++ b/app/config/specs/0.6.2.client.json @@ -0,0 +1,2 @@ + +{"swagger":"2.0","info":{"version":"0.6.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@localhost.test"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"appwrite.io","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","extensions":{"demo":"5df5acd0d48c2"}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","extensions":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"get","consumes":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","extensions":{"weight":38,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}]},"post":{"summary":"Create Account","operationId":"create","consumes":["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#createVerification) route to start verifying the user email address. To allow your new user to login to his new account, you need to create a new [account session](\/docs\/client\/account#createSession).","extensions":{"weight":32,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"email","description":"User email.","required":true,"type":"string","format":"email","x-example":"email@example.com","in":"formData"},{"name":"password","description":"User password. Must be between 6 to 32 chars.","required":true,"type":"string","format":"format","x-example":"password","in":"formData"},{"name":"name","description":"User name.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"formData"}]},"delete":{"summary":"Delete Account","operationId":"delete","consumes":["application\/json"],"tags":["account"],"description":"Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.","extensions":{"weight":46,"cookies":false,"type":"","demo":"docs\/examples\/account\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client"]},"security":[{"Project":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"updateEmail","consumes":["application\/json"],"tags":["account"],"description":"Update currently logged in user account email address. After changing user address, user confirmation status is being reset and a new confirmation mail is sent. For security measures, user password is required to complete this request.","extensions":{"weight":44,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"email","description":"User email.","required":true,"type":"string","format":"email","x-example":"email@example.com","in":"formData"},{"name":"password","description":"User password. Must be between 6 to 32 chars.","required":true,"type":"string","format":"format","x-example":"password","in":"formData"}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"getLogs","consumes":["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.","extensions":{"weight":41,"cookies":false,"type":"","demo":"docs\/examples\/account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client"]},"security":[{"Project":[]}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"updateName","consumes":["application\/json"],"tags":["account"],"description":"Update currently logged in user account name.","extensions":{"weight":42,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"name","description":"User name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"}]}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"updatePassword","consumes":["application\/json"],"tags":["account"],"description":"Update currently logged in user password. For validation, user is required to pass the password twice.","extensions":{"weight":43,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"password","description":"New user password. Must be between 6 to 32 chars.","required":true,"type":"string","format":"format","x-example":"password","in":"formData"},{"name":"oldPassword","description":"Old user password. Must be between 6 to 32 chars.","required":true,"type":"string","format":"format","x-example":"password","in":"formData"}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"getPrefs","consumes":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","extensions":{"weight":39,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"updatePrefs","consumes":["application\/json"],"tags":["account"],"description":"Update currently logged in user account preferences. You can pass only the specific settings you wish to update.","extensions":{"weight":45,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"prefs","description":"Prefs key-value JSON object.","required":true,"type":"object","x-example":"{}","in":"formData"}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"createRecovery","consumes":["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#updateRecovery) endpoint to complete the process.","extensions":{"weight":49,"cookies":false,"type":"","demo":"docs\/examples\/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}","scope":"public","platforms":["client"]},"security":[{"Project":[]}],"parameters":[{"name":"email","description":"User email.","required":true,"type":"string","format":"email","x-example":"email@example.com","in":"formData"},{"name":"url","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.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"formData"}]},"put":{"summary":"Complete Password Recovery","operationId":"updateRecovery","consumes":["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#createRecovery) 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.","extensions":{"weight":50,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"userId","description":"User account UID address.","required":true,"type":"string","x-example":"[USER_ID]","in":"formData"},{"name":"secret","description":"Valid reset token.","required":true,"type":"string","x-example":"[SECRET]","in":"formData"},{"name":"password","description":"New password. Must be between 6 to 32 chars.","required":true,"type":"string","format":"format","x-example":"password","in":"formData"},{"name":"passwordAgain","description":"New password again. Must be between 6 to 32 chars.","required":true,"type":"string","format":"format","x-example":"password","in":"formData"}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"getSessions","consumes":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","extensions":{"weight":40,"cookies":false,"type":"","demo":"docs\/examples\/account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client"]},"security":[{"Project":[]}]},"post":{"summary":"Create Account Session","operationId":"createSession","consumes":["application\/json"],"tags":["account"],"description":"Allow the user to login into his account by providing a valid email and password combination. This route will create a new session for the user.","extensions":{"weight":33,"cookies":false,"type":"","demo":"docs\/examples\/account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"]},"security":[{"Project":[]}],"parameters":[{"name":"email","description":"User email.","required":true,"type":"string","format":"email","x-example":"email@example.com","in":"formData"},{"name":"password","description":"User password. Must be between 6 to 32 chars.","required":true,"type":"string","format":"format","x-example":"password","in":"formData"}]},"delete":{"summary":"Delete All Account Sessions","operationId":"deleteSessions","consumes":["application\/json"],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","extensions":{"weight":48,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"createOAuth2Session","consumes":["application\/json"],"tags":["account"],"description":"Allow the user to login to his account using the OAuth2 provider of his 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.","extensions":{"weight":34,"cookies":false,"type":"webAuth","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, paypal, paypalSandbox, salesforce, slack, spotify, twitch, vk, yahoo, yandex.","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":"\/auth\/oauth2\/success","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":"\/auth\/oauth2\/failure","in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/{sessionId}":{"delete":{"summary":"Delete Account Session","operationId":"deleteSession","consumes":["application\/json"],"tags":["account"],"description":"Use this endpoint to log out the currently logged in user from all his account sessions across all his different devices. When using the option id argument, only the session unique ID provider will be deleted.","extensions":{"weight":47,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"sessionId","description":"Session unique ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"createVerification","consumes":["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#updateAccountVerification). \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","extensions":{"weight":51,"cookies":false,"type":"","demo":"docs\/examples\/account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"account","platforms":["client"]},"security":[{"Project":[]}],"parameters":[{"name":"url","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.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"formData"}]},"put":{"summary":"Complete Email Verification","operationId":"updateVerification","consumes":["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.","extensions":{"weight":52,"cookies":false,"type":"","demo":"docs\/examples\/account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"]},"security":[{"Project":[]}],"parameters":[{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"formData"},{"name":"secret","description":"Valid verification token.","required":true,"type":"string","x-example":"[SECRET]","in":"formData"}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"getBrowser","consumes":["application\/json"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user \/account\/sessions endpoint. Use width, height and quality arguments to change the output settings.","extensions":{"weight":54,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"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":"getCreditCard","consumes":["application\/json"],"tags":["avatars"],"description":"Need to display your users with your billing method or their payment methods? 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.","extensions":{"weight":53,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"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.","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":"getFavicon","consumes":["application\/json"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote website URL.","extensions":{"weight":57,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"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":"getFlag","consumes":["application\/json"],"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.","extensions":{"weight":55,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"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":"getImage","consumes":["application\/json"],"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.","extensions":{"weight":56,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"getInitials","consumes":["application\/json"],"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.","extensions":{"weight":59,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"getQR","consumes":["application\/json"],"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.","extensions":{"weight":58,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"type":"string","x-example":"[TEXT]","in":"query"},{"name":"size","description":"QR code size. Pass an integer between 0 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"type":"integer","format":"int32","x-example":0,"default":1,"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"type":"boolean","x-example":false,"default":false,"in":"query"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"listDocuments","consumes":["application\/json"],"tags":["database"],"description":"Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project documents. [Learn more about different API modes](\/docs\/admin).","extensions":{"weight":66,"cookies":false,"type":"","demo":"docs\/examples\/database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server"]},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"filters","description":"Array of filter strings. Each filter is constructed from a key name, comparison operator (=, !=, >, <, <=, >=) and a value. You can also use a dot (.) separator in attribute names to filter by child document attributes. Examples: 'name=John Doe' or 'category.$id>=5bed2d152c362'.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"},{"name":"offset","description":"Offset value. Use this value to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"limit","description":"Maximum number of documents to return in response. Use this value to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":50,"in":"query"},{"name":"orderField","description":"Document field that results will be sorted by.","required":false,"type":"string","x-example":"[ORDER_FIELD]","default":"$id","in":"query"},{"name":"orderType","description":"Order direction. Possible values are DESC for descending order, or ASC for ascending order.","required":false,"type":"string","x-example":"DESC","default":"ASC","in":"query"},{"name":"orderCast","description":"Order field type casting. Possible values are int, string, date, time or datetime. The database will attempt to cast the order field to the value you pass here. The default value is a string.","required":false,"type":"string","x-example":"int","default":"string","in":"query"},{"name":"search","description":"Search query. Enter any free text search. The database will try to find a match against all document attributes and children.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"}]},"post":{"summary":"Create Document","operationId":"createDocument","consumes":["application\/json"],"tags":["database"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/database?sdk=nodejs#createCollection) API or directly from your database console.","extensions":{"weight":65,"cookies":false,"type":"","demo":"docs\/examples\/database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server"]},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"data","description":"Document data as JSON object.","required":true,"type":"object","x-example":"{}","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"parentDocument","description":"Parent document unique ID. Use when you want your new document to be a child of a parent document.","required":false,"type":"string","x-example":"[PARENT_DOCUMENT]","default":"","in":"formData"},{"name":"parentProperty","description":"Parent document property name. Use when you want your new document to be a child of a parent document.","required":false,"type":"string","default":"","in":"formData"},{"name":"parentPropertyType","description":"Parent document property connection type. You can set this value to **assign**, **append** or **prepend**, default value is assign. Use when you want your new document to be a child of a parent document.","required":false,"type":"string","x-example":"assign","default":"assign","in":"formData"}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"getDocument","consumes":["application\/json"],"tags":["database"],"description":"Get document by its unique ID. This endpoint response returns a JSON object with the document data.","extensions":{"weight":67,"cookies":false,"type":"","demo":"docs\/examples\/database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server"]},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document unique ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"}]},"patch":{"summary":"Update Document","operationId":"updateDocument","consumes":["application\/json"],"tags":["database"],"description":"","extensions":{"weight":68,"cookies":false,"type":"","demo":"docs\/examples\/database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server"]},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document unique ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"},{"name":"data","description":"Document data as JSON object.","required":true,"type":"object","x-example":"{}","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]},"delete":{"summary":"Delete Document","operationId":"deleteDocument","consumes":["application\/json"],"tags":["database"],"description":"Delete document by its unique ID. This endpoint deletes only the parent documents, his attributes and relations to other documents. Child documents **will not** be deleted.","extensions":{"weight":69,"cookies":false,"type":"","demo":"docs\/examples\/database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server"]},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document unique ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"get","consumes":["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))","extensions":{"weight":70,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"getContinents","consumes":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","extensions":{"weight":74,"cookies":false,"type":"","demo":"docs\/examples\/locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server"]},"security":[{"Project":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"getCountries","consumes":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","extensions":{"weight":71,"cookies":false,"type":"","demo":"docs\/examples\/locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server"]},"security":[{"Project":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"getCountriesEU","consumes":["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.","extensions":{"weight":72,"cookies":false,"type":"","demo":"docs\/examples\/locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server"]},"security":[{"Project":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"getCountriesPhones","consumes":["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.","extensions":{"weight":73,"cookies":false,"type":"","demo":"docs\/examples\/locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server"]},"security":[{"Project":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"getCurrencies","consumes":["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.","extensions":{"weight":75,"cookies":false,"type":"","demo":"docs\/examples\/locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server"]},"security":[{"Project":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"getLanguages","consumes":["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.","extensions":{"weight":76,"cookies":false,"type":"","demo":"docs\/examples\/locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server"]},"security":[{"Project":[]}]}},"\/storage\/files":{"get":{"summary":"List Files","operationId":"listFiles","consumes":["application\/json"],"tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project files. [Learn more about different API modes](\/docs\/admin).","extensions":{"weight":124,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create File","operationId":"createFile","consumes":["multipart\/form-data"],"tags":["storage"],"description":"Create a new file. The user who creates the file will automatically be assigned to read and write access unless he has passed custom values for read and write arguments.","extensions":{"weight":123,"cookies":false,"type":"upload","demo":"docs\/examples\/storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server"]},"security":[{"Project":[]}],"parameters":[{"name":"file","description":"Binary File.","required":true,"type":"file","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]}},"\/storage\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"getFile","consumes":["application\/json"],"tags":["storage"],"description":"Get file by its unique ID. This endpoint response returns a JSON object with the file metadata.","extensions":{"weight":125,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"updateFile","consumes":["application\/json"],"tags":["storage"],"description":"Update file by its unique ID. Only users with write permissions have access to update this resource.","extensions":{"weight":129,"cookies":false,"type":"","demo":"docs\/examples\/storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server"]},"security":[{"Project":[]}],"parameters":[{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"read","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]},"delete":{"summary":"Delete File","operationId":"deleteFile","consumes":["application\/json"],"tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","extensions":{"weight":130,"cookies":false,"type":"","demo":"docs\/examples\/storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server"]},"security":[{"Project":[]}],"parameters":[{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"getFileDownload","consumes":["application\/json"],"tags":["storage"],"description":"Get 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.","extensions":{"weight":127,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"getFilePreview","consumes":["application\/json"],"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.","extensions":{"weight":126,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"fileId","description":"File unique 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":"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":"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","in":"query"}]}},"\/storage\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"getFileView","consumes":["application\/json"],"tags":["storage"],"description":"Get file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","extensions":{"weight":128,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"as","description":"Choose a file format to convert your file to. Currently you can only convert word and pdf files to pdf or txt. This option is currently experimental only, use at your own risk.","required":false,"type":"string","x-example":"pdf","default":"","in":"query"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"list","consumes":["application\/json"],"tags":["teams"],"description":"Get a list of all the current user teams. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project teams. [Learn more about different API modes](\/docs\/admin).","extensions":{"weight":132,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Team","operationId":"create","consumes":["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. The team owner can invite new members, who will be able add new owners and update or delete the team from your project.","extensions":{"weight":131,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"name","description":"Team name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"},{"name":"roles","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).","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":["owner"],"in":"formData"}]}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"get","consumes":["application\/json"],"tags":["teams"],"description":"Get team by its unique ID. All team members have read access for this resource.","extensions":{"weight":133,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"update","consumes":["application\/json"],"tags":["teams"],"description":"Update team by its unique ID. Only team owners have write access for this resource.","extensions":{"weight":134,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"name","description":"Team name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"}]},"delete":{"summary":"Delete Team","operationId":"delete","consumes":["application\/json"],"tags":["teams"],"description":"Delete team by its unique ID. Only team owners have write access for this resource.","extensions":{"weight":135,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"getMemberships","consumes":["application\/json"],"tags":["teams"],"description":"Get team members by the team unique ID. All team members have read access for this list of resources.","extensions":{"weight":137,"cookies":false,"type":"","demo":"docs\/examples\/teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server"]},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"createMembership","consumes":["application\/json"],"tags":["teams"],"description":"Use this endpoint to invite a new member to join your team. An email with a link to join the team will be sent to the new member email address if the member doesn't exist in the project it will be created automatically.\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#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team.\n\nPlease note that in order to avoid a [Redirect Attacks](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 added your platforms in the console interface.","extensions":{"weight":136,"cookies":false,"type":"","demo":"docs\/examples\/teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server"]},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"email","description":"New team member email.","required":true,"type":"string","format":"email","x-example":"email@example.com","in":"formData"},{"name":"name","description":"New team member name.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"formData"},{"name":"roles","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).","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"url","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.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"formData"}]}},"\/teams\/{teamId}\/memberships\/{inviteId}":{"delete":{"summary":"Delete Team Membership","operationId":"deleteMembership","consumes":["application\/json"],"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 he didn't accept it.","extensions":{"weight":139,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"inviteId","description":"Invite unique ID.","required":true,"type":"string","x-example":"[INVITE_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{inviteId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"updateMembershipStatus","consumes":["application\/json"],"tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after he is being redirected back to your app from the invitation email he was sent.","extensions":{"weight":138,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"inviteId","description":"Invite unique ID.","required":true,"type":"string","x-example":"[INVITE_ID]","in":"path"},{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"formData"},{"name":"secret","description":"Secret key.","required":true,"type":"string","x-example":"[SECRET]","in":"formData"}]}}},"definitions":{"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/localhost\/docs"}} \ No newline at end of file diff --git a/app/config/specs/0.6.2.console.json b/app/config/specs/0.6.2.console.json new file mode 100644 index 0000000000..8963e9ef3a --- /dev/null +++ b/app/config/specs/0.6.2.console.json @@ -0,0 +1 @@ +{"swagger":"2.0","info":{"version":"0.6.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@localhost.test"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"appwrite.io","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","extensions":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","extensions":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","extensions":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","extensions":{"demo":""}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"get","consumes":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","extensions":{"weight":38,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]},"post":{"summary":"Create Account","operationId":"create","consumes":["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#createVerification) route to start verifying the user email address. To allow your new user to login to his new account, you need to create a new [account session](\/docs\/client\/account#createSession).","extensions":{"weight":32,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"email","description":"User email.","required":true,"type":"string","format":"email","x-example":"email@example.com","in":"formData"},{"name":"password","description":"User password. Must be between 6 to 32 chars.","required":true,"type":"string","format":"format","x-example":"password","in":"formData"},{"name":"name","description":"User name.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"formData"}]},"delete":{"summary":"Delete Account","operationId":"delete","consumes":["application\/json"],"tags":["account"],"description":"Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.","extensions":{"weight":46,"cookies":false,"type":"","demo":"docs\/examples\/account\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client"]},"security":[{"Project":[],"Key":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"updateEmail","consumes":["application\/json"],"tags":["account"],"description":"Update currently logged in user account email address. After changing user address, user confirmation status is being reset and a new confirmation mail is sent. For security measures, user password is required to complete this request.","extensions":{"weight":44,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"email","description":"User email.","required":true,"type":"string","format":"email","x-example":"email@example.com","in":"formData"},{"name":"password","description":"User password. Must be between 6 to 32 chars.","required":true,"type":"string","format":"format","x-example":"password","in":"formData"}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"getLogs","consumes":["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.","extensions":{"weight":41,"cookies":false,"type":"","demo":"docs\/examples\/account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client"]},"security":[{"Project":[],"Key":[]}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"updateName","consumes":["application\/json"],"tags":["account"],"description":"Update currently logged in user account name.","extensions":{"weight":42,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"name","description":"User name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"}]}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"updatePassword","consumes":["application\/json"],"tags":["account"],"description":"Update currently logged in user password. For validation, user is required to pass the password twice.","extensions":{"weight":43,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"password","description":"New user password. Must be between 6 to 32 chars.","required":true,"type":"string","format":"format","x-example":"password","in":"formData"},{"name":"oldPassword","description":"Old user password. Must be between 6 to 32 chars.","required":true,"type":"string","format":"format","x-example":"password","in":"formData"}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"getPrefs","consumes":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","extensions":{"weight":39,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"updatePrefs","consumes":["application\/json"],"tags":["account"],"description":"Update currently logged in user account preferences. You can pass only the specific settings you wish to update.","extensions":{"weight":45,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"prefs","description":"Prefs key-value JSON object.","required":true,"type":"object","x-example":"{}","in":"formData"}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"createRecovery","consumes":["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#updateRecovery) endpoint to complete the process.","extensions":{"weight":49,"cookies":false,"type":"","demo":"docs\/examples\/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}","scope":"public","platforms":["client"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"email","description":"User email.","required":true,"type":"string","format":"email","x-example":"email@example.com","in":"formData"},{"name":"url","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.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"formData"}]},"put":{"summary":"Complete Password Recovery","operationId":"updateRecovery","consumes":["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#createRecovery) 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.","extensions":{"weight":50,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User account UID address.","required":true,"type":"string","x-example":"[USER_ID]","in":"formData"},{"name":"secret","description":"Valid reset token.","required":true,"type":"string","x-example":"[SECRET]","in":"formData"},{"name":"password","description":"New password. Must be between 6 to 32 chars.","required":true,"type":"string","format":"format","x-example":"password","in":"formData"},{"name":"passwordAgain","description":"New password again. Must be between 6 to 32 chars.","required":true,"type":"string","format":"format","x-example":"password","in":"formData"}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"getSessions","consumes":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","extensions":{"weight":40,"cookies":false,"type":"","demo":"docs\/examples\/account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client"]},"security":[{"Project":[],"Key":[]}]},"post":{"summary":"Create Account Session","operationId":"createSession","consumes":["application\/json"],"tags":["account"],"description":"Allow the user to login into his account by providing a valid email and password combination. This route will create a new session for the user.","extensions":{"weight":33,"cookies":false,"type":"","demo":"docs\/examples\/account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"email","description":"User email.","required":true,"type":"string","format":"email","x-example":"email@example.com","in":"formData"},{"name":"password","description":"User password. Must be between 6 to 32 chars.","required":true,"type":"string","format":"format","x-example":"password","in":"formData"}]},"delete":{"summary":"Delete All Account Sessions","operationId":"deleteSessions","consumes":["application\/json"],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","extensions":{"weight":48,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"createOAuth2Session","consumes":["application\/json"],"tags":["account"],"description":"Allow the user to login to his account using the OAuth2 provider of his 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.","extensions":{"weight":34,"cookies":false,"type":"webAuth","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, paypal, paypalSandbox, salesforce, slack, spotify, twitch, vk, yahoo, yandex.","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":"\/auth\/oauth2\/success","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":"\/auth\/oauth2\/failure","in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/{sessionId}":{"delete":{"summary":"Delete Account Session","operationId":"deleteSession","consumes":["application\/json"],"tags":["account"],"description":"Use this endpoint to log out the currently logged in user from all his account sessions across all his different devices. When using the option id argument, only the session unique ID provider will be deleted.","extensions":{"weight":47,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"sessionId","description":"Session unique ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"createVerification","consumes":["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#updateAccountVerification). \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","extensions":{"weight":51,"cookies":false,"type":"","demo":"docs\/examples\/account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"account","platforms":["client"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"url","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.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"formData"}]},"put":{"summary":"Complete Email Verification","operationId":"updateVerification","consumes":["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.","extensions":{"weight":52,"cookies":false,"type":"","demo":"docs\/examples\/account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"formData"},{"name":"secret","description":"Valid verification token.","required":true,"type":"string","x-example":"[SECRET]","in":"formData"}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"getBrowser","consumes":["application\/json"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user \/account\/sessions endpoint. Use width, height and quality arguments to change the output settings.","extensions":{"weight":54,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"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":"getCreditCard","consumes":["application\/json"],"tags":["avatars"],"description":"Need to display your users with your billing method or their payment methods? 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.","extensions":{"weight":53,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"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.","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":"getFavicon","consumes":["application\/json"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote website URL.","extensions":{"weight":57,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"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":"getFlag","consumes":["application\/json"],"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.","extensions":{"weight":55,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"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":"getImage","consumes":["application\/json"],"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.","extensions":{"weight":56,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"getInitials","consumes":["application\/json"],"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.","extensions":{"weight":59,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"getQR","consumes":["application\/json"],"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.","extensions":{"weight":58,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"type":"string","x-example":"[TEXT]","in":"query"},{"name":"size","description":"QR code size. Pass an integer between 0 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"type":"integer","format":"int32","x-example":0,"default":1,"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"type":"boolean","x-example":false,"default":false,"in":"query"}]}},"\/database\/collections":{"get":{"summary":"List Collections","operationId":"listCollections","consumes":["application\/json"],"tags":["database"],"description":"Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project collections. [Learn more about different API modes](\/docs\/admin).","extensions":{"weight":61,"cookies":false,"type":"","demo":"docs\/examples\/database\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Collection","operationId":"createCollection","consumes":["application\/json"],"tags":["database"],"description":"Create a new Collection.","extensions":{"weight":60,"cookies":false,"type":"","demo":"docs\/examples\/database\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"name","description":"Collection name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"rules","description":"Array of [rule objects](\/docs\/rules). Each rule define a collection field name, data type and validation.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]}},"\/database\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"getCollection","consumes":["application\/json"],"tags":["database"],"description":"Get collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.","extensions":{"weight":62,"cookies":false,"type":"","demo":"docs\/examples\/database\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"updateCollection","consumes":["application\/json"],"tags":["database"],"description":"Update collection by its unique ID.","extensions":{"weight":63,"cookies":false,"type":"","demo":"docs\/examples\/database\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"name","description":"Collection name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions(\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"rules","description":"Array of [rule objects](\/docs\/rules). Each rule define a collection field name, data type and validation.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"formData"}]},"delete":{"summary":"Delete Collection","operationId":"deleteCollection","consumes":["application\/json"],"tags":["database"],"description":"Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.","extensions":{"weight":64,"cookies":false,"type":"","demo":"docs\/examples\/database\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"listDocuments","consumes":["application\/json"],"tags":["database"],"description":"Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project documents. [Learn more about different API modes](\/docs\/admin).","extensions":{"weight":66,"cookies":false,"type":"","demo":"docs\/examples\/database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"filters","description":"Array of filter strings. Each filter is constructed from a key name, comparison operator (=, !=, >, <, <=, >=) and a value. You can also use a dot (.) separator in attribute names to filter by child document attributes. Examples: 'name=John Doe' or 'category.$id>=5bed2d152c362'.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"},{"name":"offset","description":"Offset value. Use this value to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"limit","description":"Maximum number of documents to return in response. Use this value to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":50,"in":"query"},{"name":"orderField","description":"Document field that results will be sorted by.","required":false,"type":"string","x-example":"[ORDER_FIELD]","default":"$id","in":"query"},{"name":"orderType","description":"Order direction. Possible values are DESC for descending order, or ASC for ascending order.","required":false,"type":"string","x-example":"DESC","default":"ASC","in":"query"},{"name":"orderCast","description":"Order field type casting. Possible values are int, string, date, time or datetime. The database will attempt to cast the order field to the value you pass here. The default value is a string.","required":false,"type":"string","x-example":"int","default":"string","in":"query"},{"name":"search","description":"Search query. Enter any free text search. The database will try to find a match against all document attributes and children.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"}]},"post":{"summary":"Create Document","operationId":"createDocument","consumes":["application\/json"],"tags":["database"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/database?sdk=nodejs#createCollection) API or directly from your database console.","extensions":{"weight":65,"cookies":false,"type":"","demo":"docs\/examples\/database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"data","description":"Document data as JSON object.","required":true,"type":"object","x-example":"{}","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"parentDocument","description":"Parent document unique ID. Use when you want your new document to be a child of a parent document.","required":false,"type":"string","x-example":"[PARENT_DOCUMENT]","default":"","in":"formData"},{"name":"parentProperty","description":"Parent document property name. Use when you want your new document to be a child of a parent document.","required":false,"type":"string","default":"","in":"formData"},{"name":"parentPropertyType","description":"Parent document property connection type. You can set this value to **assign**, **append** or **prepend**, default value is assign. Use when you want your new document to be a child of a parent document.","required":false,"type":"string","x-example":"assign","default":"assign","in":"formData"}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"getDocument","consumes":["application\/json"],"tags":["database"],"description":"Get document by its unique ID. This endpoint response returns a JSON object with the document data.","extensions":{"weight":67,"cookies":false,"type":"","demo":"docs\/examples\/database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document unique ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"}]},"patch":{"summary":"Update Document","operationId":"updateDocument","consumes":["application\/json"],"tags":["database"],"description":"","extensions":{"weight":68,"cookies":false,"type":"","demo":"docs\/examples\/database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document unique ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"},{"name":"data","description":"Document data as JSON object.","required":true,"type":"object","x-example":"{}","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]},"delete":{"summary":"Delete Document","operationId":"deleteDocument","consumes":["application\/json"],"tags":["database"],"description":"Delete document by its unique ID. This endpoint deletes only the parent documents, his attributes and relations to other documents. Child documents **will not** be deleted.","extensions":{"weight":69,"cookies":false,"type":"","demo":"docs\/examples\/database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document unique ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"get","consumes":["application\/json"],"tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","extensions":{"weight":77,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Anti virus","operationId":"getAntiVirus","consumes":["application\/json"],"tags":["health"],"description":"Check the Appwrite Anti Virus server is up and connection is successful.","extensions":{"weight":89,"cookies":false,"type":"","demo":"docs\/examples\/health\/get-anti-virus.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"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"getCache","consumes":["application\/json"],"tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","extensions":{"weight":80,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"getDB","consumes":["application\/json"],"tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","extensions":{"weight":79,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificate Queue","operationId":"getQueueCertificates","consumes":["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.","extensions":{"weight":86,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"getQueueFunctions","consumes":["application\/json"],"tags":["health"],"description":"","extensions":{"weight":87,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"getQueueLogs","consumes":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","extensions":{"weight":84,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/tasks":{"get":{"summary":"Get Tasks Queue","operationId":"getQueueTasks","consumes":["application\/json"],"tags":["health"],"description":"Get the number of tasks that are waiting to be processed in the Appwrite internal queue server.","extensions":{"weight":83,"cookies":false,"type":"","demo":"docs\/examples\/health\/get-queue-tasks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-tasks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/usage":{"get":{"summary":"Get Usage Queue","operationId":"getQueueUsage","consumes":["application\/json"],"tags":["health"],"description":"Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server.","extensions":{"weight":85,"cookies":false,"type":"","demo":"docs\/examples\/health\/get-queue-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"getQueueWebhooks","consumes":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","extensions":{"weight":82,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"getStorageLocal","consumes":["application\/json"],"tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","extensions":{"weight":88,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"getTime","consumes":["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.","extensions":{"weight":81,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"get","consumes":["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))","extensions":{"weight":70,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"getContinents","consumes":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","extensions":{"weight":74,"cookies":false,"type":"","demo":"docs\/examples\/locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"getCountries","consumes":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","extensions":{"weight":71,"cookies":false,"type":"","demo":"docs\/examples\/locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"getCountriesEU","consumes":["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.","extensions":{"weight":72,"cookies":false,"type":"","demo":"docs\/examples\/locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"getCountriesPhones","consumes":["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.","extensions":{"weight":73,"cookies":false,"type":"","demo":"docs\/examples\/locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"getCurrencies","consumes":["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.","extensions":{"weight":75,"cookies":false,"type":"","demo":"docs\/examples\/locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"getLanguages","consumes":["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.","extensions":{"weight":76,"cookies":false,"type":"","demo":"docs\/examples\/locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}]}},"\/mock\/tests\/bar":{"get":{"summary":"Mock a get request for SDK tests","operationId":"get","consumes":["application\/json"],"tags":["bar"],"description":"","extensions":{"weight":155,"cookies":false,"type":"","demo":"docs\/examples\/bar\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/masterMock a get request for SDK tests","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"x","description":"Sample string param","required":true,"type":"string","x-example":"[]","in":"query"},{"name":"y","description":"Sample numeric param","required":true,"type":"integer","format":"int32","in":"query"},{"name":"z","description":"Sample array param","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"query"}]},"post":{"summary":"Mock a post request for SDK tests","operationId":"post","consumes":["application\/json"],"tags":["bar"],"description":"","extensions":{"weight":156,"cookies":false,"type":"","demo":"docs\/examples\/bar\/post.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/masterMock a post request for SDK tests","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"x","description":"Sample string param","required":true,"type":"string","x-example":"[]","in":"formData"},{"name":"y","description":"Sample numeric param","required":true,"type":"integer","format":"int32","in":"formData"},{"name":"z","description":"Sample array param","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]},"put":{"summary":"Mock a put request for SDK tests","operationId":"put","consumes":["application\/json"],"tags":["bar"],"description":"","extensions":{"weight":158,"cookies":false,"type":"","demo":"docs\/examples\/bar\/put.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/masterMock a put request for SDK tests","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"x","description":"Sample string param","required":true,"type":"string","x-example":"[]","in":"formData"},{"name":"y","description":"Sample numeric param","required":true,"type":"integer","format":"int32","in":"formData"},{"name":"z","description":"Sample array param","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]},"patch":{"summary":"Mock a patch request for SDK tests","operationId":"patch","consumes":["application\/json"],"tags":["bar"],"description":"","extensions":{"weight":157,"cookies":false,"type":"","demo":"docs\/examples\/bar\/patch.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/masterMock a get request for SDK tests","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"x","description":"Sample string param","required":true,"type":"string","x-example":"[]","in":"formData"},{"name":"y","description":"Sample numeric param","required":true,"type":"integer","format":"int32","in":"formData"},{"name":"z","description":"Sample array param","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]},"delete":{"summary":"Mock a delete request for SDK tests","operationId":"delete","consumes":["application\/json"],"tags":["bar"],"description":"","extensions":{"weight":159,"cookies":false,"type":"","demo":"docs\/examples\/bar\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/masterMock a delete request for SDK tests","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"x","description":"Sample string param","required":true,"type":"string","x-example":"[]","in":"formData"},{"name":"y","description":"Sample numeric param","required":true,"type":"integer","format":"int32","in":"formData"},{"name":"z","description":"Sample array param","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]}},"\/mock\/tests\/foo":{"get":{"summary":"Mock a get request for SDK tests","operationId":"get","consumes":["application\/json"],"tags":["foo"],"description":"","extensions":{"weight":150,"cookies":false,"type":"","demo":"docs\/examples\/foo\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/masterMock a get request for SDK tests","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"x","description":"Sample string param","required":true,"type":"string","x-example":"[]","in":"query"},{"name":"y","description":"Sample numeric param","required":true,"type":"integer","format":"int32","in":"query"},{"name":"z","description":"Sample array param","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"query"}]},"post":{"summary":"Mock a post request for SDK tests","operationId":"post","consumes":["application\/json"],"tags":["foo"],"description":"","extensions":{"weight":151,"cookies":false,"type":"","demo":"docs\/examples\/foo\/post.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/masterMock a post request for SDK tests","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"x","description":"Sample string param","required":true,"type":"string","x-example":"[]","in":"formData"},{"name":"y","description":"Sample numeric param","required":true,"type":"integer","format":"int32","in":"formData"},{"name":"z","description":"Sample array param","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]},"put":{"summary":"Mock a put request for SDK tests","operationId":"put","consumes":["application\/json"],"tags":["foo"],"description":"","extensions":{"weight":153,"cookies":false,"type":"","demo":"docs\/examples\/foo\/put.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/masterMock a put request for SDK tests","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"x","description":"Sample string param","required":true,"type":"string","x-example":"[]","in":"formData"},{"name":"y","description":"Sample numeric param","required":true,"type":"integer","format":"int32","in":"formData"},{"name":"z","description":"Sample array param","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]},"patch":{"summary":"Mock a patch request for SDK tests","operationId":"patch","consumes":["application\/json"],"tags":["foo"],"description":"","extensions":{"weight":152,"cookies":false,"type":"","demo":"docs\/examples\/foo\/patch.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/masterMock a get request for SDK tests","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"x","description":"Sample string param","required":true,"type":"string","x-example":"[]","in":"formData"},{"name":"y","description":"Sample numeric param","required":true,"type":"integer","format":"int32","in":"formData"},{"name":"z","description":"Sample array param","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]},"delete":{"summary":"Mock a delete request for SDK tests","operationId":"delete","consumes":["application\/json"],"tags":["foo"],"description":"","extensions":{"weight":154,"cookies":false,"type":"","demo":"docs\/examples\/foo\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/masterMock a delete request for SDK tests","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"x","description":"Sample string param","required":true,"type":"string","x-example":"[]","in":"formData"},{"name":"y","description":"Sample numeric param","required":true,"type":"integer","format":"int32","in":"formData"},{"name":"z","description":"Sample array param","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]}},"\/mock\/tests\/general\/empty":{"get":{"summary":"Mock a post request for SDK tests","operationId":"empty","consumes":["application\/json"],"tags":["general"],"description":"","extensions":{"weight":165,"cookies":false,"type":"","demo":"docs\/examples\/general\/empty.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/masterMock a redirected request for SDK tests","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":[]},"security":[{"Project":[],"Key":[]}]}},"\/mock\/tests\/general\/get-cookie":{"get":{"summary":"Mock a cookie request for SDK tests","operationId":"getCookie","consumes":["application\/json"],"tags":["general"],"description":"","extensions":{"weight":164,"cookies":false,"type":"","demo":"docs\/examples\/general\/get-cookie.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/masterMock a get cookie request for SDK tests","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":[]},"security":[{"Project":[],"Key":[]}]}},"\/mock\/tests\/general\/redirect":{"get":{"summary":"Mock a post request for SDK tests","operationId":"redirect","consumes":["application\/json"],"tags":["general"],"description":"","extensions":{"weight":161,"cookies":false,"type":"","demo":"docs\/examples\/general\/redirect.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/masterMock a redirect request for SDK tests","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":[]},"security":[{"Project":[],"Key":[]}]}},"\/mock\/tests\/general\/redirected":{"get":{"summary":"Mock a post request for SDK tests","operationId":"redirected","consumes":["application\/json"],"tags":["general"],"description":"","extensions":{"weight":162,"cookies":false,"type":"","demo":"docs\/examples\/general\/redirected.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/masterMock a redirected request for SDK tests","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":[]},"security":[{"Project":[],"Key":[]}]}},"\/mock\/tests\/general\/set-cookie":{"get":{"summary":"Mock a cookie request for SDK tests","operationId":"setCookie","consumes":["application\/json"],"tags":["general"],"description":"","extensions":{"weight":163,"cookies":false,"type":"","demo":"docs\/examples\/general\/set-cookie.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/masterMock a set cookie request for SDK tests","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":[]},"security":[{"Project":[],"Key":[]}]}},"\/mock\/tests\/general\/upload":{"post":{"summary":"Mock a post request for SDK tests","operationId":"upload","consumes":["multipart\/form-data"],"tags":["general"],"description":"","extensions":{"weight":160,"cookies":false,"type":"","demo":"docs\/examples\/general\/upload.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/masterMock a delete request for SDK tests","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"x","description":"Sample string param","required":true,"type":"string","x-example":"[]","in":"formData"},{"name":"y","description":"Sample numeric param","required":true,"type":"integer","format":"int32","in":"formData"},{"name":"z","description":"Sample array param","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"file","description":"Sample file param","required":true,"type":"file","in":"formData"}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"list","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":92,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}]},"post":{"summary":"Create Project","operationId":"create","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":91,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"name","description":"Project name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"},{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"formData"},{"name":"description","description":"Project description.","required":false,"type":"string","x-example":"[DESCRIPTION]","default":"","in":"formData"},{"name":"logo","description":"Project logo.","required":false,"type":"string","x-example":"[LOGO]","default":"","in":"formData"},{"name":"url","description":"Project URL.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"formData"},{"name":"legalName","description":"Project legal Name.","required":false,"type":"string","x-example":"[LEGAL_NAME]","default":"","in":"formData"},{"name":"legalCountry","description":"Project legal Country.","required":false,"type":"string","x-example":"[LEGAL_COUNTRY]","default":"","in":"formData"},{"name":"legalState","description":"Project legal State.","required":false,"type":"string","x-example":"[LEGAL_STATE]","default":"","in":"formData"},{"name":"legalCity","description":"Project legal City.","required":false,"type":"string","x-example":"[LEGAL_CITY]","default":"","in":"formData"},{"name":"legalAddress","description":"Project legal Address.","required":false,"type":"string","x-example":"[LEGAL_ADDRESS]","default":"","in":"formData"},{"name":"legalTaxId","description":"Project legal Tax ID.","required":false,"type":"string","x-example":"[LEGAL_TAX_ID]","default":"","in":"formData"}]}},"\/projects\/{projectId}":{"get":{"summary":"Get Project","operationId":"get","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":93,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"patch":{"summary":"Update Project","operationId":"update","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":95,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"name","description":"Project name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"},{"name":"description","description":"Project description.","required":false,"type":"string","x-example":"[DESCRIPTION]","default":"","in":"formData"},{"name":"logo","description":"Project logo.","required":false,"type":"string","x-example":"[LOGO]","default":"","in":"formData"},{"name":"url","description":"Project URL.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"formData"},{"name":"legalName","description":"Project legal name.","required":false,"type":"string","x-example":"[LEGAL_NAME]","default":"","in":"formData"},{"name":"legalCountry","description":"Project legal country..","required":false,"type":"string","x-example":"[LEGAL_COUNTRY]","default":"","in":"formData"},{"name":"legalState","description":"Project legal state.","required":false,"type":"string","x-example":"[LEGAL_STATE]","default":"","in":"formData"},{"name":"legalCity","description":"Project legal city.","required":false,"type":"string","x-example":"[LEGAL_CITY]","default":"","in":"formData"},{"name":"legalAddress","description":"Project legal address.","required":false,"type":"string","x-example":"[LEGAL_ADDRESS]","default":"","in":"formData"},{"name":"legalTaxId","description":"Project legal tax ID.","required":false,"type":"string","x-example":"[LEGAL_TAX_ID]","default":"","in":"formData"}]},"delete":{"summary":"Delete Project","operationId":"delete","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":97,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"password","description":"Your user password for confirmation. Must be between 6 to 32 chars.","required":true,"type":"string","x-example":"[PASSWORD]","in":"formData"}]}},"\/projects\/{projectId}\/domains":{"get":{"summary":"List Domains","operationId":"listDomains","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":119,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Domain","operationId":"createDomain","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":118,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domain","description":"Domain name.","required":true,"type":"string","in":"formData"}]}},"\/projects\/{projectId}\/domains\/{domainId}":{"get":{"summary":"Get Domain","operationId":"getDomain","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":120,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"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":"deleteDomain","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":122,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"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":"updateDomainVerification","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":121,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"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":"listKeys","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":104,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Key","operationId":"createKey","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":103,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"name","description":"Key name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"},{"name":"scopes","description":"Key scopes list.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]}},"\/projects\/{projectId}\/keys\/{keyId}":{"get":{"summary":"Get Key","operationId":"getKey","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":105,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"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":"updateKey","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":106,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"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":"name","description":"Key name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"},{"name":"scopes","description":"Key scopes list","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]},"delete":{"summary":"Delete Key","operationId":"deleteKey","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":107,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"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":"updateOAuth2","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":96,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"provider","description":"Provider Name","required":true,"type":"string","x-example":"amazon","in":"formData"},{"name":"appId","description":"Provider app ID.","required":false,"type":"string","x-example":"[APP_ID]","default":"","in":"formData"},{"name":"secret","description":"Provider secret key.","required":false,"type":"string","x-example":"[SECRET]","default":"","in":"formData"}]}},"\/projects\/{projectId}\/platforms":{"get":{"summary":"List Platforms","operationId":"listPlatforms","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":114,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Platform","operationId":"createPlatform","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":113,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"type","description":"Platform type.","required":true,"type":"string","x-example":"web","in":"formData"},{"name":"name","description":"Platform name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"},{"name":"key","description":"Package name for android or bundle ID for iOS.","required":false,"type":"string","x-example":"[KEY]","default":"","in":"formData"},{"name":"store","description":"App store or Google Play store ID.","required":false,"type":"string","x-example":"[STORE]","default":"","in":"formData"},{"name":"hostname","description":"Platform client hostname.","required":false,"type":"string","x-example":"[HOSTNAME]","default":"","in":"formData"}]}},"\/projects\/{projectId}\/platforms\/{platformId}":{"get":{"summary":"Get Platform","operationId":"getPlatform","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":115,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"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":"updatePlatform","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":116,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"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":"name","description":"Platform name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"},{"name":"key","description":"Package name for android or bundle ID for iOS.","required":false,"type":"string","x-example":"[KEY]","default":"","in":"formData"},{"name":"store","description":"App store or Google Play store ID.","required":false,"type":"string","x-example":"[STORE]","default":"","in":"formData"},{"name":"hostname","description":"Platform client URL.","required":false,"type":"string","x-example":"[HOSTNAME]","default":"","in":"formData"}]},"delete":{"summary":"Delete Platform","operationId":"deletePlatform","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":117,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"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}\/tasks":{"get":{"summary":"List Tasks","operationId":"listTasks","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":109,"cookies":false,"type":"","demo":"docs\/examples\/projects\/list-tasks.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":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Task","operationId":"createTask","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":108,"cookies":false,"type":"","demo":"docs\/examples\/projects\/create-task.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"name","description":"Task name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"},{"name":"status","description":"Task status.","required":true,"type":"string","x-example":"play","in":"formData"},{"name":"schedule","description":"Task schedule CRON syntax.","required":true,"type":"string","in":"formData"},{"name":"security","description":"Certificate verification, false for disabled or true for enabled.","required":true,"type":"boolean","x-example":false,"in":"formData"},{"name":"httpMethod","description":"Task HTTP method.","required":true,"type":"string","x-example":"GET","in":"formData"},{"name":"httpUrl","description":"Task HTTP URL","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"formData"},{"name":"httpHeaders","description":"Task HTTP headers list.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"httpUser","description":"Task HTTP user.","required":false,"type":"string","x-example":"[HTTP_USER]","default":"","in":"formData"},{"name":"httpPass","description":"Task HTTP password.","required":false,"type":"string","x-example":"[HTTP_PASS]","default":"","in":"formData"}]}},"\/projects\/{projectId}\/tasks\/{taskId}":{"get":{"summary":"Get Task","operationId":"getTask","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":110,"cookies":false,"type":"","demo":"docs\/examples\/projects\/get-task.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":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"taskId","description":"Task unique ID.","required":true,"type":"string","x-example":"[TASK_ID]","in":"path"}]},"put":{"summary":"Update Task","operationId":"updateTask","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":111,"cookies":false,"type":"","demo":"docs\/examples\/projects\/update-task.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"taskId","description":"Task unique ID.","required":true,"type":"string","x-example":"[TASK_ID]","in":"path"},{"name":"name","description":"Task name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"},{"name":"status","description":"Task status.","required":true,"type":"string","x-example":"play","in":"formData"},{"name":"schedule","description":"Task schedule CRON syntax.","required":true,"type":"string","in":"formData"},{"name":"security","description":"Certificate verification, false for disabled or true for enabled.","required":true,"type":"boolean","x-example":false,"in":"formData"},{"name":"httpMethod","description":"Task HTTP method.","required":true,"type":"string","x-example":"GET","in":"formData"},{"name":"httpUrl","description":"Task HTTP URL.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"formData"},{"name":"httpHeaders","description":"Task HTTP headers list.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"httpUser","description":"Task HTTP user.","required":false,"type":"string","x-example":"[HTTP_USER]","default":"","in":"formData"},{"name":"httpPass","description":"Task HTTP password.","required":false,"type":"string","x-example":"[HTTP_PASS]","default":"","in":"formData"}]},"delete":{"summary":"Delete Task","operationId":"deleteTask","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":112,"cookies":false,"type":"","demo":"docs\/examples\/projects\/delete-task.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"taskId","description":"Task unique ID.","required":true,"type":"string","x-example":"[TASK_ID]","in":"path"}]}},"\/projects\/{projectId}\/usage":{"get":{"summary":"Get Project","operationId":"getUsage","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":94,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"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":"daily","default":"last30","in":"query"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"listWebhooks","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":99,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Webhook","operationId":"createWebhook","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":98,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"name","description":"Webhook name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"},{"name":"events","description":"Webhook events list.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"url","description":"Webhook URL.","required":true,"type":"string","x-example":"[URL]","in":"formData"},{"name":"security","description":"Certificate verification, false for disabled or true for enabled.","required":true,"type":"boolean","x-example":false,"in":"formData"},{"name":"httpUser","description":"Webhook HTTP user.","required":false,"type":"string","x-example":"[HTTP_USER]","default":"","in":"formData"},{"name":"httpPass","description":"Webhook HTTP password.","required":false,"type":"string","x-example":"[HTTP_PASS]","default":"","in":"formData"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"getWebhook","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":100,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"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":"updateWebhook","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":101,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"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":"name","description":"Webhook name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"},{"name":"events","description":"Webhook events list.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"url","description":"Webhook URL.","required":true,"type":"string","x-example":"[URL]","in":"formData"},{"name":"security","description":"Certificate verification, false for disabled or true for enabled.","required":true,"type":"boolean","x-example":false,"in":"formData"},{"name":"httpUser","description":"Webhook HTTP user.","required":false,"type":"string","x-example":"[HTTP_USER]","default":"","in":"formData"},{"name":"httpPass","description":"Webhook HTTP password.","required":false,"type":"string","x-example":"[HTTP_PASS]","default":"","in":"formData"}]},"delete":{"summary":"Delete Webhook","operationId":"deleteWebhook","consumes":["application\/json"],"tags":["projects"],"description":"","extensions":{"weight":102,"cookies":false,"type":"","demo":"docs\/examples\/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":[]},"security":[{"Project":[],"Key":[]}],"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\/files":{"get":{"summary":"List Files","operationId":"listFiles","consumes":["application\/json"],"tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project files. [Learn more about different API modes](\/docs\/admin).","extensions":{"weight":124,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create File","operationId":"createFile","consumes":["multipart\/form-data"],"tags":["storage"],"description":"Create a new file. The user who creates the file will automatically be assigned to read and write access unless he has passed custom values for read and write arguments.","extensions":{"weight":123,"cookies":false,"type":"upload","demo":"docs\/examples\/storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"file","description":"Binary File.","required":true,"type":"file","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]}},"\/storage\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"getFile","consumes":["application\/json"],"tags":["storage"],"description":"Get file by its unique ID. This endpoint response returns a JSON object with the file metadata.","extensions":{"weight":125,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"updateFile","consumes":["application\/json"],"tags":["storage"],"description":"Update file by its unique ID. Only users with write permissions have access to update this resource.","extensions":{"weight":129,"cookies":false,"type":"","demo":"docs\/examples\/storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"read","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]},"delete":{"summary":"Delete File","operationId":"deleteFile","consumes":["application\/json"],"tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","extensions":{"weight":130,"cookies":false,"type":"","demo":"docs\/examples\/storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"getFileDownload","consumes":["application\/json"],"tags":["storage"],"description":"Get 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.","extensions":{"weight":127,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"getFilePreview","consumes":["application\/json"],"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.","extensions":{"weight":126,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"fileId","description":"File unique 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":"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":"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","in":"query"}]}},"\/storage\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"getFileView","consumes":["application\/json"],"tags":["storage"],"description":"Get file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","extensions":{"weight":128,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"as","description":"Choose a file format to convert your file to. Currently you can only convert word and pdf files to pdf or txt. This option is currently experimental only, use at your own risk.","required":false,"type":"string","x-example":"pdf","default":"","in":"query"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"list","consumes":["application\/json"],"tags":["teams"],"description":"Get a list of all the current user teams. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project teams. [Learn more about different API modes](\/docs\/admin).","extensions":{"weight":132,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Team","operationId":"create","consumes":["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. The team owner can invite new members, who will be able add new owners and update or delete the team from your project.","extensions":{"weight":131,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"name","description":"Team name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"},{"name":"roles","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).","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":["owner"],"in":"formData"}]}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"get","consumes":["application\/json"],"tags":["teams"],"description":"Get team by its unique ID. All team members have read access for this resource.","extensions":{"weight":133,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"update","consumes":["application\/json"],"tags":["teams"],"description":"Update team by its unique ID. Only team owners have write access for this resource.","extensions":{"weight":134,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"name","description":"Team name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"}]},"delete":{"summary":"Delete Team","operationId":"delete","consumes":["application\/json"],"tags":["teams"],"description":"Delete team by its unique ID. Only team owners have write access for this resource.","extensions":{"weight":135,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"getMemberships","consumes":["application\/json"],"tags":["teams"],"description":"Get team members by the team unique ID. All team members have read access for this list of resources.","extensions":{"weight":137,"cookies":false,"type":"","demo":"docs\/examples\/teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"createMembership","consumes":["application\/json"],"tags":["teams"],"description":"Use this endpoint to invite a new member to join your team. An email with a link to join the team will be sent to the new member email address if the member doesn't exist in the project it will be created automatically.\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#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team.\n\nPlease note that in order to avoid a [Redirect Attacks](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 added your platforms in the console interface.","extensions":{"weight":136,"cookies":false,"type":"","demo":"docs\/examples\/teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"email","description":"New team member email.","required":true,"type":"string","format":"email","x-example":"email@example.com","in":"formData"},{"name":"name","description":"New team member name.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"formData"},{"name":"roles","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).","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"url","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.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"formData"}]}},"\/teams\/{teamId}\/memberships\/{inviteId}":{"delete":{"summary":"Delete Team Membership","operationId":"deleteMembership","consumes":["application\/json"],"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 he didn't accept it.","extensions":{"weight":139,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"inviteId","description":"Invite unique ID.","required":true,"type":"string","x-example":"[INVITE_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{inviteId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"updateMembershipStatus","consumes":["application\/json"],"tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after he is being redirected back to your app from the invitation email he was sent.","extensions":{"weight":138,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"inviteId","description":"Invite unique ID.","required":true,"type":"string","x-example":"[INVITE_ID]","in":"path"},{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"formData"},{"name":"secret","description":"Secret key.","required":true,"type":"string","x-example":"[SECRET]","in":"formData"}]}},"\/users":{"get":{"summary":"List Users","operationId":"list","consumes":["application\/json"],"tags":["users"],"description":"Get a list of all the project users. You can use the query params to filter your results.","extensions":{"weight":141,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create User","operationId":"create","consumes":["application\/json"],"tags":["users"],"description":"Create a new user.","extensions":{"weight":140,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"email","description":"User email.","required":true,"type":"string","format":"email","x-example":"email@example.com","in":"formData"},{"name":"password","description":"User password. Must be between 6 to 32 chars.","required":true,"type":"string","format":"format","x-example":"password","in":"formData"},{"name":"name","description":"User name.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"formData"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"get","consumes":["application\/json"],"tags":["users"],"description":"Get user by its unique ID.","extensions":{"weight":142,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"getLogs","consumes":["application\/json"],"tags":["users"],"description":"Get user activity logs list by its unique ID.","extensions":{"weight":145,"cookies":false,"type":"","demo":"docs\/examples\/users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"getPrefs","consumes":["application\/json"],"tags":["users"],"description":"Get user preferences by its unique ID.","extensions":{"weight":143,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"updatePrefs","consumes":["application\/json"],"tags":["users"],"description":"Update user preferences by its unique ID. You can pass only the specific settings you wish to update.","extensions":{"weight":147,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"prefs","description":"Prefs key-value JSON object.","required":true,"type":"object","x-example":"{}","in":"formData"}]}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"getSessions","consumes":["application\/json"],"tags":["users"],"description":"Get user sessions list by its unique ID.","extensions":{"weight":144,"cookies":false,"type":"","demo":"docs\/examples\/users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"deleteSessions","consumes":["application\/json"],"tags":["users"],"description":"Delete all user sessions by its unique ID.","extensions":{"weight":149,"cookies":false,"type":"","demo":"docs\/examples\/users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"deleteSession","consumes":["application\/json"],"tags":["users"],"description":"Delete user sessions by its unique ID.","extensions":{"weight":148,"cookies":false,"type":"","demo":"docs\/examples\/users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"sessionId","description":"User unique session ID.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"updateStatus","consumes":["application\/json"],"tags":["users"],"description":"Update user status by its unique ID.","extensions":{"weight":146,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"status","description":"User Status code. To activate the user pass 1, to block the user pass 2 and for disabling the user pass 0","required":true,"type":"string","x-example":1,"in":"formData"}]}}},"definitions":{"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/localhost\/docs"}} \ No newline at end of file diff --git a/app/config/specs/0.6.2.server.json b/app/config/specs/0.6.2.server.json new file mode 100644 index 0000000000..c13f492351 --- /dev/null +++ b/app/config/specs/0.6.2.server.json @@ -0,0 +1 @@ +{"swagger":"2.0","info":{"version":"0.6.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@localhost.test"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"appwrite.io","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","extensions":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","extensions":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","extensions":{"demo":"en"}}},"paths":{"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"getBrowser","consumes":["application\/json"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user \/account\/sessions endpoint. Use width, height and quality arguments to change the output settings.","extensions":{"weight":54,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"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":"getCreditCard","consumes":["application\/json"],"tags":["avatars"],"description":"Need to display your users with your billing method or their payment methods? 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.","extensions":{"weight":53,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"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.","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":"getFavicon","consumes":["application\/json"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote website URL.","extensions":{"weight":57,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"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":"getFlag","consumes":["application\/json"],"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.","extensions":{"weight":55,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"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":"getImage","consumes":["application\/json"],"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.","extensions":{"weight":56,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"getInitials","consumes":["application\/json"],"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.","extensions":{"weight":59,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"getQR","consumes":["application\/json"],"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.","extensions":{"weight":58,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"type":"string","x-example":"[TEXT]","in":"query"},{"name":"size","description":"QR code size. Pass an integer between 0 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"type":"integer","format":"int32","x-example":0,"default":1,"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"type":"boolean","x-example":false,"default":false,"in":"query"}]}},"\/database\/collections":{"get":{"summary":"List Collections","operationId":"listCollections","consumes":["application\/json"],"tags":["database"],"description":"Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project collections. [Learn more about different API modes](\/docs\/admin).","extensions":{"weight":61,"cookies":false,"type":"","demo":"docs\/examples\/database\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Collection","operationId":"createCollection","consumes":["application\/json"],"tags":["database"],"description":"Create a new Collection.","extensions":{"weight":60,"cookies":false,"type":"","demo":"docs\/examples\/database\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"name","description":"Collection name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"rules","description":"Array of [rule objects](\/docs\/rules). Each rule define a collection field name, data type and validation.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]}},"\/database\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"getCollection","consumes":["application\/json"],"tags":["database"],"description":"Get collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.","extensions":{"weight":62,"cookies":false,"type":"","demo":"docs\/examples\/database\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"updateCollection","consumes":["application\/json"],"tags":["database"],"description":"Update collection by its unique ID.","extensions":{"weight":63,"cookies":false,"type":"","demo":"docs\/examples\/database\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"name","description":"Collection name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions(\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"rules","description":"Array of [rule objects](\/docs\/rules). Each rule define a collection field name, data type and validation.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"formData"}]},"delete":{"summary":"Delete Collection","operationId":"deleteCollection","consumes":["application\/json"],"tags":["database"],"description":"Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.","extensions":{"weight":64,"cookies":false,"type":"","demo":"docs\/examples\/database\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"listDocuments","consumes":["application\/json"],"tags":["database"],"description":"Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project documents. [Learn more about different API modes](\/docs\/admin).","extensions":{"weight":66,"cookies":false,"type":"","demo":"docs\/examples\/database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"filters","description":"Array of filter strings. Each filter is constructed from a key name, comparison operator (=, !=, >, <, <=, >=) and a value. You can also use a dot (.) separator in attribute names to filter by child document attributes. Examples: 'name=John Doe' or 'category.$id>=5bed2d152c362'.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"},{"name":"offset","description":"Offset value. Use this value to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"limit","description":"Maximum number of documents to return in response. Use this value to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":50,"in":"query"},{"name":"orderField","description":"Document field that results will be sorted by.","required":false,"type":"string","x-example":"[ORDER_FIELD]","default":"$id","in":"query"},{"name":"orderType","description":"Order direction. Possible values are DESC for descending order, or ASC for ascending order.","required":false,"type":"string","x-example":"DESC","default":"ASC","in":"query"},{"name":"orderCast","description":"Order field type casting. Possible values are int, string, date, time or datetime. The database will attempt to cast the order field to the value you pass here. The default value is a string.","required":false,"type":"string","x-example":"int","default":"string","in":"query"},{"name":"search","description":"Search query. Enter any free text search. The database will try to find a match against all document attributes and children.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"}]},"post":{"summary":"Create Document","operationId":"createDocument","consumes":["application\/json"],"tags":["database"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/database?sdk=nodejs#createCollection) API or directly from your database console.","extensions":{"weight":65,"cookies":false,"type":"","demo":"docs\/examples\/database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"data","description":"Document data as JSON object.","required":true,"type":"object","x-example":"{}","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"parentDocument","description":"Parent document unique ID. Use when you want your new document to be a child of a parent document.","required":false,"type":"string","x-example":"[PARENT_DOCUMENT]","default":"","in":"formData"},{"name":"parentProperty","description":"Parent document property name. Use when you want your new document to be a child of a parent document.","required":false,"type":"string","default":"","in":"formData"},{"name":"parentPropertyType","description":"Parent document property connection type. You can set this value to **assign**, **append** or **prepend**, default value is assign. Use when you want your new document to be a child of a parent document.","required":false,"type":"string","x-example":"assign","default":"assign","in":"formData"}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"getDocument","consumes":["application\/json"],"tags":["database"],"description":"Get document by its unique ID. This endpoint response returns a JSON object with the document data.","extensions":{"weight":67,"cookies":false,"type":"","demo":"docs\/examples\/database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document unique ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"}]},"patch":{"summary":"Update Document","operationId":"updateDocument","consumes":["application\/json"],"tags":["database"],"description":"","extensions":{"weight":68,"cookies":false,"type":"","demo":"docs\/examples\/database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document unique ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"},{"name":"data","description":"Document data as JSON object.","required":true,"type":"object","x-example":"{}","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]},"delete":{"summary":"Delete Document","operationId":"deleteDocument","consumes":["application\/json"],"tags":["database"],"description":"Delete document by its unique ID. This endpoint deletes only the parent documents, his attributes and relations to other documents. Child documents **will not** be deleted.","extensions":{"weight":69,"cookies":false,"type":"","demo":"docs\/examples\/database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document unique ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"get","consumes":["application\/json"],"tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","extensions":{"weight":77,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Anti virus","operationId":"getAntiVirus","consumes":["application\/json"],"tags":["health"],"description":"Check the Appwrite Anti Virus server is up and connection is successful.","extensions":{"weight":89,"cookies":false,"type":"","demo":"docs\/examples\/health\/get-anti-virus.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"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"getCache","consumes":["application\/json"],"tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","extensions":{"weight":80,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"getDB","consumes":["application\/json"],"tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","extensions":{"weight":79,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificate Queue","operationId":"getQueueCertificates","consumes":["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.","extensions":{"weight":86,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"getQueueFunctions","consumes":["application\/json"],"tags":["health"],"description":"","extensions":{"weight":87,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"getQueueLogs","consumes":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","extensions":{"weight":84,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/tasks":{"get":{"summary":"Get Tasks Queue","operationId":"getQueueTasks","consumes":["application\/json"],"tags":["health"],"description":"Get the number of tasks that are waiting to be processed in the Appwrite internal queue server.","extensions":{"weight":83,"cookies":false,"type":"","demo":"docs\/examples\/health\/get-queue-tasks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-tasks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/usage":{"get":{"summary":"Get Usage Queue","operationId":"getQueueUsage","consumes":["application\/json"],"tags":["health"],"description":"Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server.","extensions":{"weight":85,"cookies":false,"type":"","demo":"docs\/examples\/health\/get-queue-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"getQueueWebhooks","consumes":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","extensions":{"weight":82,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"getStorageLocal","consumes":["application\/json"],"tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","extensions":{"weight":88,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"getTime","consumes":["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.","extensions":{"weight":81,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"get","consumes":["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))","extensions":{"weight":70,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"getContinents","consumes":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","extensions":{"weight":74,"cookies":false,"type":"","demo":"docs\/examples\/locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"getCountries","consumes":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","extensions":{"weight":71,"cookies":false,"type":"","demo":"docs\/examples\/locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"getCountriesEU","consumes":["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.","extensions":{"weight":72,"cookies":false,"type":"","demo":"docs\/examples\/locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"getCountriesPhones","consumes":["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.","extensions":{"weight":73,"cookies":false,"type":"","demo":"docs\/examples\/locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"getCurrencies","consumes":["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.","extensions":{"weight":75,"cookies":false,"type":"","demo":"docs\/examples\/locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"getLanguages","consumes":["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.","extensions":{"weight":76,"cookies":false,"type":"","demo":"docs\/examples\/locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}]}},"\/storage\/files":{"get":{"summary":"List Files","operationId":"listFiles","consumes":["application\/json"],"tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project files. [Learn more about different API modes](\/docs\/admin).","extensions":{"weight":124,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create File","operationId":"createFile","consumes":["multipart\/form-data"],"tags":["storage"],"description":"Create a new file. The user who creates the file will automatically be assigned to read and write access unless he has passed custom values for read and write arguments.","extensions":{"weight":123,"cookies":false,"type":"upload","demo":"docs\/examples\/storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"file","description":"Binary File.","required":true,"type":"file","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]}},"\/storage\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"getFile","consumes":["application\/json"],"tags":["storage"],"description":"Get file by its unique ID. This endpoint response returns a JSON object with the file metadata.","extensions":{"weight":125,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"updateFile","consumes":["application\/json"],"tags":["storage"],"description":"Update file by its unique ID. Only users with write permissions have access to update this resource.","extensions":{"weight":129,"cookies":false,"type":"","demo":"docs\/examples\/storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"read","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"}]},"delete":{"summary":"Delete File","operationId":"deleteFile","consumes":["application\/json"],"tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","extensions":{"weight":130,"cookies":false,"type":"","demo":"docs\/examples\/storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"getFileDownload","consumes":["application\/json"],"tags":["storage"],"description":"Get 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.","extensions":{"weight":127,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"getFilePreview","consumes":["application\/json"],"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.","extensions":{"weight":126,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"fileId","description":"File unique 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":"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":"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","in":"query"}]}},"\/storage\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"getFileView","consumes":["application\/json"],"tags":["storage"],"description":"Get file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","extensions":{"weight":128,"cookies":false,"type":"location","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"as","description":"Choose a file format to convert your file to. Currently you can only convert word and pdf files to pdf or txt. This option is currently experimental only, use at your own risk.","required":false,"type":"string","x-example":"pdf","default":"","in":"query"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"list","consumes":["application\/json"],"tags":["teams"],"description":"Get a list of all the current user teams. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project teams. [Learn more about different API modes](\/docs\/admin).","extensions":{"weight":132,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Team","operationId":"create","consumes":["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. The team owner can invite new members, who will be able add new owners and update or delete the team from your project.","extensions":{"weight":131,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"name","description":"Team name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"},{"name":"roles","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).","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":["owner"],"in":"formData"}]}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"get","consumes":["application\/json"],"tags":["teams"],"description":"Get team by its unique ID. All team members have read access for this resource.","extensions":{"weight":133,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"update","consumes":["application\/json"],"tags":["teams"],"description":"Update team by its unique ID. Only team owners have write access for this resource.","extensions":{"weight":134,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"name","description":"Team name.","required":true,"type":"string","x-example":"[NAME]","in":"formData"}]},"delete":{"summary":"Delete Team","operationId":"delete","consumes":["application\/json"],"tags":["teams"],"description":"Delete team by its unique ID. Only team owners have write access for this resource.","extensions":{"weight":135,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"getMemberships","consumes":["application\/json"],"tags":["teams"],"description":"Get team members by the team unique ID. All team members have read access for this list of resources.","extensions":{"weight":137,"cookies":false,"type":"","demo":"docs\/examples\/teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"createMembership","consumes":["application\/json"],"tags":["teams"],"description":"Use this endpoint to invite a new member to join your team. An email with a link to join the team will be sent to the new member email address if the member doesn't exist in the project it will be created automatically.\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#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team.\n\nPlease note that in order to avoid a [Redirect Attacks](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 added your platforms in the console interface.","extensions":{"weight":136,"cookies":false,"type":"","demo":"docs\/examples\/teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"email","description":"New team member email.","required":true,"type":"string","format":"email","x-example":"email@example.com","in":"formData"},{"name":"name","description":"New team member name.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"formData"},{"name":"roles","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).","required":true,"type":"array","collectionFormat":"multi","items":{"type":"string"},"in":"formData"},{"name":"url","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.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"formData"}]}},"\/teams\/{teamId}\/memberships\/{inviteId}":{"delete":{"summary":"Delete Team Membership","operationId":"deleteMembership","consumes":["application\/json"],"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 he didn't accept it.","extensions":{"weight":139,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"teamId","description":"Team unique ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"inviteId","description":"Invite unique ID.","required":true,"type":"string","x-example":"[INVITE_ID]","in":"path"}]}},"\/users":{"get":{"summary":"List Users","operationId":"list","consumes":["application\/json"],"tags":["users"],"description":"Get a list of all the project users. You can use the query params to filter your results.","extensions":{"weight":141,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create User","operationId":"create","consumes":["application\/json"],"tags":["users"],"description":"Create a new user.","extensions":{"weight":140,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"email","description":"User email.","required":true,"type":"string","format":"email","x-example":"email@example.com","in":"formData"},{"name":"password","description":"User password. Must be between 6 to 32 chars.","required":true,"type":"string","format":"format","x-example":"password","in":"formData"},{"name":"name","description":"User name.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"formData"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"get","consumes":["application\/json"],"tags":["users"],"description":"Get user by its unique ID.","extensions":{"weight":142,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"getLogs","consumes":["application\/json"],"tags":["users"],"description":"Get user activity logs list by its unique ID.","extensions":{"weight":145,"cookies":false,"type":"","demo":"docs\/examples\/users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"getPrefs","consumes":["application\/json"],"tags":["users"],"description":"Get user preferences by its unique ID.","extensions":{"weight":143,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"updatePrefs","consumes":["application\/json"],"tags":["users"],"description":"Update user preferences by its unique ID. You can pass only the specific settings you wish to update.","extensions":{"weight":147,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"prefs","description":"Prefs key-value JSON object.","required":true,"type":"object","x-example":"{}","in":"formData"}]}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"getSessions","consumes":["application\/json"],"tags":["users"],"description":"Get user sessions list by its unique ID.","extensions":{"weight":144,"cookies":false,"type":"","demo":"docs\/examples\/users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"deleteSessions","consumes":["application\/json"],"tags":["users"],"description":"Delete all user sessions by its unique ID.","extensions":{"weight":149,"cookies":false,"type":"","demo":"docs\/examples\/users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"deleteSession","consumes":["application\/json"],"tags":["users"],"description":"Delete user sessions by its unique ID.","extensions":{"weight":148,"cookies":false,"type":"","demo":"docs\/examples\/users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"sessionId","description":"User unique session ID.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"updateStatus","consumes":["application\/json"],"tags":["users"],"description":"Update user status by its unique ID.","extensions":{"weight":146,"cookies":false,"type":"","demo":"docs\/examples\/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"]},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User unique ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"status","description":"User Status code. To activate the user pass 1, to block the user pass 2 and for disabling the user pass 0","required":true,"type":"string","x-example":1,"in":"formData"}]}}},"definitions":{"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/localhost\/docs"}} \ No newline at end of file diff --git a/app/sdks/client-flutter-dev/CHANGELOG.md b/app/sdks/client-flutter-dev/CHANGELOG.md index c9013a17eb..2e9b0e0a91 100644 --- a/app/sdks/client-flutter-dev/CHANGELOG.md +++ b/app/sdks/client-flutter-dev/CHANGELOG.md @@ -1,3 +1,16 @@ +## 0.3.2 + +- Fixed package namespaces + +## 0.3.1 + +- Downgraded meta package version to 1.1.8 + +## 0.3.0 + +- Updated package dependencies (@lohanidamodar) +- Added Flutter for Web compatibility (@lohanidamodar) + ## 0.2.3 - Fixed OAuth2 cookie bug, where a new session cookie couldn't overwrite an old cookie diff --git a/app/sdks/client-flutter-dev/README.md b/app/sdks/client-flutter-dev/README.md index 09deaf5054..2c0ba754c3 100644 --- a/app/sdks/client-flutter-dev/README.md +++ b/app/sdks/client-flutter-dev/README.md @@ -20,13 +20,13 @@ Add this to your package's `pubspec.yaml` file: ```yml dependencies: - appwrite: ^0.2.3 + appwrite_dev: ^0.3.2 ``` You can install packages from the command line: ```bash -pub get appwrite +pub get appwrite_dev ``` ## Contribution diff --git a/app/sdks/client-flutter-dev/docs/examples/account/create-o-auth2session.md b/app/sdks/client-flutter-dev/docs/examples/account/create-o-auth2session.md index c617c34d4d..aae9d5f9a0 100644 --- a/app/sdks/client-flutter-dev/docs/examples/account/create-o-auth2session.md +++ b/app/sdks/client-flutter-dev/docs/examples/account/create-o-auth2session.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/account/create-recovery.md b/app/sdks/client-flutter-dev/docs/examples/account/create-recovery.md index 50db45b15d..32fe469cff 100644 --- a/app/sdks/client-flutter-dev/docs/examples/account/create-recovery.md +++ b/app/sdks/client-flutter-dev/docs/examples/account/create-recovery.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/account/create-session.md b/app/sdks/client-flutter-dev/docs/examples/account/create-session.md index ef824b4eca..a5930877f4 100644 --- a/app/sdks/client-flutter-dev/docs/examples/account/create-session.md +++ b/app/sdks/client-flutter-dev/docs/examples/account/create-session.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/account/create-verification.md b/app/sdks/client-flutter-dev/docs/examples/account/create-verification.md index 6b9b1ace40..738f22df42 100644 --- a/app/sdks/client-flutter-dev/docs/examples/account/create-verification.md +++ b/app/sdks/client-flutter-dev/docs/examples/account/create-verification.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/account/create.md b/app/sdks/client-flutter-dev/docs/examples/account/create.md index 384258ae68..1f92976c39 100644 --- a/app/sdks/client-flutter-dev/docs/examples/account/create.md +++ b/app/sdks/client-flutter-dev/docs/examples/account/create.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/account/delete-session.md b/app/sdks/client-flutter-dev/docs/examples/account/delete-session.md index 80a3f505d0..95b3641387 100644 --- a/app/sdks/client-flutter-dev/docs/examples/account/delete-session.md +++ b/app/sdks/client-flutter-dev/docs/examples/account/delete-session.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/account/delete-sessions.md b/app/sdks/client-flutter-dev/docs/examples/account/delete-sessions.md index 5e947fabc2..b9cbb46fd2 100644 --- a/app/sdks/client-flutter-dev/docs/examples/account/delete-sessions.md +++ b/app/sdks/client-flutter-dev/docs/examples/account/delete-sessions.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/account/delete.md b/app/sdks/client-flutter-dev/docs/examples/account/delete.md index 2853a1f437..8c99b2ac61 100644 --- a/app/sdks/client-flutter-dev/docs/examples/account/delete.md +++ b/app/sdks/client-flutter-dev/docs/examples/account/delete.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/account/get-logs.md b/app/sdks/client-flutter-dev/docs/examples/account/get-logs.md index 8f52f8220b..2ed66d88ce 100644 --- a/app/sdks/client-flutter-dev/docs/examples/account/get-logs.md +++ b/app/sdks/client-flutter-dev/docs/examples/account/get-logs.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/account/get-prefs.md b/app/sdks/client-flutter-dev/docs/examples/account/get-prefs.md index 01d57a5499..961a24dc19 100644 --- a/app/sdks/client-flutter-dev/docs/examples/account/get-prefs.md +++ b/app/sdks/client-flutter-dev/docs/examples/account/get-prefs.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/account/get-sessions.md b/app/sdks/client-flutter-dev/docs/examples/account/get-sessions.md index e921bda59b..76a566b959 100644 --- a/app/sdks/client-flutter-dev/docs/examples/account/get-sessions.md +++ b/app/sdks/client-flutter-dev/docs/examples/account/get-sessions.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/account/get.md b/app/sdks/client-flutter-dev/docs/examples/account/get.md index 35241b5607..cd05062a69 100644 --- a/app/sdks/client-flutter-dev/docs/examples/account/get.md +++ b/app/sdks/client-flutter-dev/docs/examples/account/get.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/account/update-email.md b/app/sdks/client-flutter-dev/docs/examples/account/update-email.md index 4a1a002db4..9fc86a7aae 100644 --- a/app/sdks/client-flutter-dev/docs/examples/account/update-email.md +++ b/app/sdks/client-flutter-dev/docs/examples/account/update-email.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/account/update-name.md b/app/sdks/client-flutter-dev/docs/examples/account/update-name.md index fa432bb34a..e5e218a515 100644 --- a/app/sdks/client-flutter-dev/docs/examples/account/update-name.md +++ b/app/sdks/client-flutter-dev/docs/examples/account/update-name.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/account/update-password.md b/app/sdks/client-flutter-dev/docs/examples/account/update-password.md index 9bd8ad9b77..869b4d9a30 100644 --- a/app/sdks/client-flutter-dev/docs/examples/account/update-password.md +++ b/app/sdks/client-flutter-dev/docs/examples/account/update-password.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/account/update-prefs.md b/app/sdks/client-flutter-dev/docs/examples/account/update-prefs.md index 443252f89a..0d50469742 100644 --- a/app/sdks/client-flutter-dev/docs/examples/account/update-prefs.md +++ b/app/sdks/client-flutter-dev/docs/examples/account/update-prefs.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/account/update-recovery.md b/app/sdks/client-flutter-dev/docs/examples/account/update-recovery.md index 5140235d49..e028e60a7d 100644 --- a/app/sdks/client-flutter-dev/docs/examples/account/update-recovery.md +++ b/app/sdks/client-flutter-dev/docs/examples/account/update-recovery.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/account/update-verification.md b/app/sdks/client-flutter-dev/docs/examples/account/update-verification.md index b795cde92d..48d669efcc 100644 --- a/app/sdks/client-flutter-dev/docs/examples/account/update-verification.md +++ b/app/sdks/client-flutter-dev/docs/examples/account/update-verification.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/avatars/get-browser.md b/app/sdks/client-flutter-dev/docs/examples/avatars/get-browser.md index 464767c4c0..dec7863b1f 100644 --- a/app/sdks/client-flutter-dev/docs/examples/avatars/get-browser.md +++ b/app/sdks/client-flutter-dev/docs/examples/avatars/get-browser.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/avatars/get-credit-card.md b/app/sdks/client-flutter-dev/docs/examples/avatars/get-credit-card.md index 482c642402..e2746c4999 100644 --- a/app/sdks/client-flutter-dev/docs/examples/avatars/get-credit-card.md +++ b/app/sdks/client-flutter-dev/docs/examples/avatars/get-credit-card.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/avatars/get-favicon.md b/app/sdks/client-flutter-dev/docs/examples/avatars/get-favicon.md index 60397b0af2..1c56335b9f 100644 --- a/app/sdks/client-flutter-dev/docs/examples/avatars/get-favicon.md +++ b/app/sdks/client-flutter-dev/docs/examples/avatars/get-favicon.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/avatars/get-flag.md b/app/sdks/client-flutter-dev/docs/examples/avatars/get-flag.md index a9f7a711d9..8a91f608ce 100644 --- a/app/sdks/client-flutter-dev/docs/examples/avatars/get-flag.md +++ b/app/sdks/client-flutter-dev/docs/examples/avatars/get-flag.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/avatars/get-image.md b/app/sdks/client-flutter-dev/docs/examples/avatars/get-image.md index 7cead1cb2f..a2cbea98e3 100644 --- a/app/sdks/client-flutter-dev/docs/examples/avatars/get-image.md +++ b/app/sdks/client-flutter-dev/docs/examples/avatars/get-image.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/avatars/get-q-r.md b/app/sdks/client-flutter-dev/docs/examples/avatars/get-q-r.md index a5bcfd2c05..2737297082 100644 --- a/app/sdks/client-flutter-dev/docs/examples/avatars/get-q-r.md +++ b/app/sdks/client-flutter-dev/docs/examples/avatars/get-q-r.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/database/create-document.md b/app/sdks/client-flutter-dev/docs/examples/database/create-document.md index b7d540bc2d..6fc27bdfbb 100644 --- a/app/sdks/client-flutter-dev/docs/examples/database/create-document.md +++ b/app/sdks/client-flutter-dev/docs/examples/database/create-document.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/database/delete-document.md b/app/sdks/client-flutter-dev/docs/examples/database/delete-document.md index 40c1cbdfe2..74bcd69d9a 100644 --- a/app/sdks/client-flutter-dev/docs/examples/database/delete-document.md +++ b/app/sdks/client-flutter-dev/docs/examples/database/delete-document.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/database/get-document.md b/app/sdks/client-flutter-dev/docs/examples/database/get-document.md index 0c98142315..639209ed3c 100644 --- a/app/sdks/client-flutter-dev/docs/examples/database/get-document.md +++ b/app/sdks/client-flutter-dev/docs/examples/database/get-document.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/database/list-documents.md b/app/sdks/client-flutter-dev/docs/examples/database/list-documents.md index 0685e7f1aa..41eac5dd9a 100644 --- a/app/sdks/client-flutter-dev/docs/examples/database/list-documents.md +++ b/app/sdks/client-flutter-dev/docs/examples/database/list-documents.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/database/update-document.md b/app/sdks/client-flutter-dev/docs/examples/database/update-document.md index 2f37cd767a..0b153b1595 100644 --- a/app/sdks/client-flutter-dev/docs/examples/database/update-document.md +++ b/app/sdks/client-flutter-dev/docs/examples/database/update-document.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/locale/get-continents.md b/app/sdks/client-flutter-dev/docs/examples/locale/get-continents.md index 2a6a6413ba..2c6bd7389f 100644 --- a/app/sdks/client-flutter-dev/docs/examples/locale/get-continents.md +++ b/app/sdks/client-flutter-dev/docs/examples/locale/get-continents.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/locale/get-countries-e-u.md b/app/sdks/client-flutter-dev/docs/examples/locale/get-countries-e-u.md index 1934fc6709..443fb2d115 100644 --- a/app/sdks/client-flutter-dev/docs/examples/locale/get-countries-e-u.md +++ b/app/sdks/client-flutter-dev/docs/examples/locale/get-countries-e-u.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/locale/get-countries-phones.md b/app/sdks/client-flutter-dev/docs/examples/locale/get-countries-phones.md index f6b1f58749..e08e2bca47 100644 --- a/app/sdks/client-flutter-dev/docs/examples/locale/get-countries-phones.md +++ b/app/sdks/client-flutter-dev/docs/examples/locale/get-countries-phones.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/locale/get-countries.md b/app/sdks/client-flutter-dev/docs/examples/locale/get-countries.md index 104584968f..a64a23c666 100644 --- a/app/sdks/client-flutter-dev/docs/examples/locale/get-countries.md +++ b/app/sdks/client-flutter-dev/docs/examples/locale/get-countries.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/locale/get-currencies.md b/app/sdks/client-flutter-dev/docs/examples/locale/get-currencies.md index 8dc01fc68e..e086245ffd 100644 --- a/app/sdks/client-flutter-dev/docs/examples/locale/get-currencies.md +++ b/app/sdks/client-flutter-dev/docs/examples/locale/get-currencies.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/locale/get.md b/app/sdks/client-flutter-dev/docs/examples/locale/get.md index 189fceb7d1..5cb8ae176e 100644 --- a/app/sdks/client-flutter-dev/docs/examples/locale/get.md +++ b/app/sdks/client-flutter-dev/docs/examples/locale/get.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/storage/create-file.md b/app/sdks/client-flutter-dev/docs/examples/storage/create-file.md index 9f61be12f4..d824bd5831 100644 --- a/app/sdks/client-flutter-dev/docs/examples/storage/create-file.md +++ b/app/sdks/client-flutter-dev/docs/examples/storage/create-file.md @@ -1,5 +1,5 @@ import 'dart:io'; -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/storage/delete-file.md b/app/sdks/client-flutter-dev/docs/examples/storage/delete-file.md index 271ed7b2dd..88e7b8815c 100644 --- a/app/sdks/client-flutter-dev/docs/examples/storage/delete-file.md +++ b/app/sdks/client-flutter-dev/docs/examples/storage/delete-file.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/storage/get-file-download.md b/app/sdks/client-flutter-dev/docs/examples/storage/get-file-download.md index be3385a61b..483340e24a 100644 --- a/app/sdks/client-flutter-dev/docs/examples/storage/get-file-download.md +++ b/app/sdks/client-flutter-dev/docs/examples/storage/get-file-download.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/storage/get-file-preview.md b/app/sdks/client-flutter-dev/docs/examples/storage/get-file-preview.md index 8bd1a47457..dd8d924fe7 100644 --- a/app/sdks/client-flutter-dev/docs/examples/storage/get-file-preview.md +++ b/app/sdks/client-flutter-dev/docs/examples/storage/get-file-preview.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/storage/get-file-view.md b/app/sdks/client-flutter-dev/docs/examples/storage/get-file-view.md index 5803fd409f..8ed6a946e0 100644 --- a/app/sdks/client-flutter-dev/docs/examples/storage/get-file-view.md +++ b/app/sdks/client-flutter-dev/docs/examples/storage/get-file-view.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/storage/get-file.md b/app/sdks/client-flutter-dev/docs/examples/storage/get-file.md index feca667fa9..4e398f88fd 100644 --- a/app/sdks/client-flutter-dev/docs/examples/storage/get-file.md +++ b/app/sdks/client-flutter-dev/docs/examples/storage/get-file.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/storage/list-files.md b/app/sdks/client-flutter-dev/docs/examples/storage/list-files.md index 1963ec694d..d72ba29e03 100644 --- a/app/sdks/client-flutter-dev/docs/examples/storage/list-files.md +++ b/app/sdks/client-flutter-dev/docs/examples/storage/list-files.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/storage/update-file.md b/app/sdks/client-flutter-dev/docs/examples/storage/update-file.md index a5ecbfe987..95e213ddc2 100644 --- a/app/sdks/client-flutter-dev/docs/examples/storage/update-file.md +++ b/app/sdks/client-flutter-dev/docs/examples/storage/update-file.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/teams/create-membership.md b/app/sdks/client-flutter-dev/docs/examples/teams/create-membership.md index e5e82de7b4..31bf7ec1af 100644 --- a/app/sdks/client-flutter-dev/docs/examples/teams/create-membership.md +++ b/app/sdks/client-flutter-dev/docs/examples/teams/create-membership.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/teams/create.md b/app/sdks/client-flutter-dev/docs/examples/teams/create.md index d11958ae6d..e50279de01 100644 --- a/app/sdks/client-flutter-dev/docs/examples/teams/create.md +++ b/app/sdks/client-flutter-dev/docs/examples/teams/create.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/teams/delete-membership.md b/app/sdks/client-flutter-dev/docs/examples/teams/delete-membership.md index 3f57b840fe..015507d3a2 100644 --- a/app/sdks/client-flutter-dev/docs/examples/teams/delete-membership.md +++ b/app/sdks/client-flutter-dev/docs/examples/teams/delete-membership.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/teams/delete.md b/app/sdks/client-flutter-dev/docs/examples/teams/delete.md index 9fb488afec..6cc1367f9b 100644 --- a/app/sdks/client-flutter-dev/docs/examples/teams/delete.md +++ b/app/sdks/client-flutter-dev/docs/examples/teams/delete.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/teams/get-memberships.md b/app/sdks/client-flutter-dev/docs/examples/teams/get-memberships.md index 4edadfa2b4..d427c9ac47 100644 --- a/app/sdks/client-flutter-dev/docs/examples/teams/get-memberships.md +++ b/app/sdks/client-flutter-dev/docs/examples/teams/get-memberships.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/teams/get.md b/app/sdks/client-flutter-dev/docs/examples/teams/get.md index 083565f7a6..1bca70a23f 100644 --- a/app/sdks/client-flutter-dev/docs/examples/teams/get.md +++ b/app/sdks/client-flutter-dev/docs/examples/teams/get.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/teams/list.md b/app/sdks/client-flutter-dev/docs/examples/teams/list.md index 665020e928..c56e7a5dd5 100644 --- a/app/sdks/client-flutter-dev/docs/examples/teams/list.md +++ b/app/sdks/client-flutter-dev/docs/examples/teams/list.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/teams/update-membership-status.md b/app/sdks/client-flutter-dev/docs/examples/teams/update-membership-status.md index 616f64e148..6098b38ed9 100644 --- a/app/sdks/client-flutter-dev/docs/examples/teams/update-membership-status.md +++ b/app/sdks/client-flutter-dev/docs/examples/teams/update-membership-status.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/docs/examples/teams/update.md b/app/sdks/client-flutter-dev/docs/examples/teams/update.md index 915fb57d38..2494f408d9 100644 --- a/app/sdks/client-flutter-dev/docs/examples/teams/update.md +++ b/app/sdks/client-flutter-dev/docs/examples/teams/update.md @@ -1,4 +1,4 @@ -import 'package:appwrite/appwrite.dart'; +import 'package:appwrite_dev/appwrite_dev.dart'; void main() { // Init SDK Client client = Client(); diff --git a/app/sdks/client-flutter-dev/lib/appwrite_dev.dart b/app/sdks/client-flutter-dev/lib/appwrite_dev.dart new file mode 100644 index 0000000000..95d0b72cfe --- /dev/null +++ b/app/sdks/client-flutter-dev/lib/appwrite_dev.dart @@ -0,0 +1,10 @@ +export 'package:dio/dio.dart' show Response; + +export 'client.dart'; +export 'enums.dart'; +export 'services/account.dart'; +export 'services/avatars.dart'; +export 'services/database.dart'; +export 'services/locale.dart'; +export 'services/storage.dart'; +export 'services/teams.dart'; diff --git a/app/sdks/client-flutter-dev/lib/client.dart b/app/sdks/client-flutter-dev/lib/client.dart index 7a53d0414b..a5583fcd00 100644 --- a/app/sdks/client-flutter-dev/lib/client.dart +++ b/app/sdks/client-flutter-dev/lib/client.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:dio/dio.dart'; +import 'package:flutter/foundation.dart'; import 'package:dio/adapter.dart'; import 'package:dio_cookie_manager/dio_cookie_manager.dart'; import 'package:cookie_jar/cookie_jar.dart'; @@ -20,17 +21,21 @@ class Client { PersistCookieJar cookieJar; Client({this.endPoint = 'https://appwrite.io/v1', this.selfSigned = false, Dio http}) : this.http = http ?? Dio() { - - type = (Platform.isIOS) ? 'ios' : type; - type = (Platform.isMacOS) ? 'macos' : type; - type = (Platform.isAndroid) ? 'android' : type; - type = (Platform.isLinux) ? 'linux' : type; - type = (Platform.isWindows) ? 'windows' : type; - type = (Platform.isFuchsia) ? 'fuchsia' : type; + // Platform is not supported in web so if web, set type to web automatically and skip Platform check + if(kIsWeb) { + type = 'web'; + }else{ + type = (Platform.isIOS) ? 'ios' : type; + type = (Platform.isMacOS) ? 'macos' : type; + type = (Platform.isAndroid) ? 'android' : type; + type = (Platform.isLinux) ? 'linux' : type; + type = (Platform.isWindows) ? 'windows' : type; + type = (Platform.isFuchsia) ? 'fuchsia' : type; + } this.headers = { 'content-type': 'application/json', - 'x-sdk-version': 'appwrite:dart:0.2.3', + 'x-sdk-version': 'appwrite:flutter:0.3.2', }; this.config = {}; @@ -78,17 +83,20 @@ class Client { Future init() async { if(!initialized) { - final Directory cookieDir = await _getCookiePath(); - - cookieJar = new PersistCookieJar(dir:cookieDir.path); + // if web skip cookie implementation and origin header as those are automatically handled by browsers + if(!kIsWeb) { + final Directory cookieDir = await _getCookiePath(); + cookieJar = new PersistCookieJar(dir:cookieDir.path); + this.http.interceptors.add(CookieManager(cookieJar)); + PackageInfo packageInfo = await PackageInfo.fromPlatform(); + addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName); + }else{ + // if web set httpClientAdapter as BrowserHttpClientAdapter with withCredentials true to make cookies work + this.http.options.extra['withCredentials'] = true; + } this.http.options.baseUrl = this.endPoint; this.http.options.validateStatus = (status) => status < 400; - this.http.interceptors.add(CookieManager(cookieJar)); - - PackageInfo packageInfo = await PackageInfo.fromPlatform(); - - addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName); } } @@ -114,6 +122,10 @@ class Client { } if (method == HttpMethod.get) { + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + return http.get(path, queryParameters: params, options: options); } else { return http.request(path, data: params, options: options); diff --git a/app/sdks/client-flutter-dev/lib/services/avatars.dart b/app/sdks/client-flutter-dev/lib/services/avatars.dart index fc9c403d90..828ea7dfb0 100644 --- a/app/sdks/client-flutter-dev/lib/services/avatars.dart +++ b/app/sdks/client-flutter-dev/lib/services/avatars.dart @@ -27,6 +27,10 @@ class Avatars extends Service { 'project': client.config['project'], }; + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + Uri endpoint = Uri.parse(client.endPoint); Uri location = new Uri(scheme: endpoint.scheme, host: endpoint.host, @@ -55,6 +59,10 @@ class Avatars extends Service { 'project': client.config['project'], }; + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + Uri endpoint = Uri.parse(client.endPoint); Uri location = new Uri(scheme: endpoint.scheme, host: endpoint.host, @@ -79,6 +87,10 @@ class Avatars extends Service { 'project': client.config['project'], }; + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + Uri endpoint = Uri.parse(client.endPoint); Uri location = new Uri(scheme: endpoint.scheme, host: endpoint.host, @@ -106,6 +118,10 @@ class Avatars extends Service { 'project': client.config['project'], }; + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + Uri endpoint = Uri.parse(client.endPoint); Uri location = new Uri(scheme: endpoint.scheme, host: endpoint.host, @@ -134,6 +150,10 @@ class Avatars extends Service { 'project': client.config['project'], }; + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + Uri endpoint = Uri.parse(client.endPoint); Uri location = new Uri(scheme: endpoint.scheme, host: endpoint.host, @@ -161,6 +181,10 @@ class Avatars extends Service { 'project': client.config['project'], }; + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + Uri endpoint = Uri.parse(client.endPoint); Uri location = new Uri(scheme: endpoint.scheme, host: endpoint.host, diff --git a/app/sdks/client-flutter-dev/lib/services/storage.dart b/app/sdks/client-flutter-dev/lib/services/storage.dart index 696c15ee3a..51f9345050 100644 --- a/app/sdks/client-flutter-dev/lib/services/storage.dart +++ b/app/sdks/client-flutter-dev/lib/services/storage.dart @@ -124,6 +124,10 @@ class Storage extends Service { 'project': client.config['project'], }; + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + Uri endpoint = Uri.parse(client.endPoint); Uri location = new Uri(scheme: endpoint.scheme, host: endpoint.host, @@ -154,6 +158,10 @@ class Storage extends Service { 'project': client.config['project'], }; + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + Uri endpoint = Uri.parse(client.endPoint); Uri location = new Uri(scheme: endpoint.scheme, host: endpoint.host, @@ -178,6 +186,10 @@ class Storage extends Service { 'project': client.config['project'], }; + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + Uri endpoint = Uri.parse(client.endPoint); Uri location = new Uri(scheme: endpoint.scheme, host: endpoint.host, diff --git a/app/sdks/client-flutter-dev/pubspec.yaml b/app/sdks/client-flutter-dev/pubspec.yaml index ea8f29d01e..7d3646b8ee 100644 --- a/app/sdks/client-flutter-dev/pubspec.yaml +++ b/app/sdks/client-flutter-dev/pubspec.yaml @@ -1,5 +1,5 @@ -name: appwrite -version: 0.2.3 +name: appwrite_dev +version: 0.3.2 description: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API homepage: https://appwrite.io repository: https://github.com/appwrite/sdk-for-flutter-dev @@ -9,30 +9,15 @@ environment: sdk: '>=2.6.0 <3.0.0' dependencies: meta: ^1.1.8 - path_provider: ^1.6.5 - package_info: ^0.4.0+16 - dio: ^3.0.0 - cookie_jar: ^1.0.0 + path_provider: ^1.6.14 + package_info: ^0.4.3 + dio: ^3.0.10 + cookie_jar: ^1.0.1 dio_cookie_manager: ^1.0.0 flutter_web_auth: ^0.2.4 flutter: sdk: flutter - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^0.1.2 - dev_dependencies: flutter_test: - sdk: flutter - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true \ No newline at end of file + sdk: flutter \ No newline at end of file diff --git a/app/sdks/client-flutter/CHANGELOG.md b/app/sdks/client-flutter/CHANGELOG.md index c9013a17eb..638d0882d2 100644 --- a/app/sdks/client-flutter/CHANGELOG.md +++ b/app/sdks/client-flutter/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.3.0-dev.1 + +- Updated package dependencies (@lohanidamodar) +- Added Flutter for Web compatibility (@lohanidamodar) + ## 0.2.3 - Fixed OAuth2 cookie bug, where a new session cookie couldn't overwrite an old cookie diff --git a/app/sdks/client-flutter/README.md b/app/sdks/client-flutter/README.md index 877cf5d30f..95cdeae642 100644 --- a/app/sdks/client-flutter/README.md +++ b/app/sdks/client-flutter/README.md @@ -20,7 +20,7 @@ Add this to your package's `pubspec.yaml` file: ```yml dependencies: - appwrite: ^0.2.3 + appwrite: ^0.3.0-dev.1 ``` You can install packages from the command line: diff --git a/app/sdks/client-flutter/lib/client.dart b/app/sdks/client-flutter/lib/client.dart index 7a53d0414b..1cf3ac8f0d 100644 --- a/app/sdks/client-flutter/lib/client.dart +++ b/app/sdks/client-flutter/lib/client.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:dio/dio.dart'; +import 'package:flutter/foundation.dart'; import 'package:dio/adapter.dart'; import 'package:dio_cookie_manager/dio_cookie_manager.dart'; import 'package:cookie_jar/cookie_jar.dart'; @@ -20,17 +21,21 @@ class Client { PersistCookieJar cookieJar; Client({this.endPoint = 'https://appwrite.io/v1', this.selfSigned = false, Dio http}) : this.http = http ?? Dio() { - - type = (Platform.isIOS) ? 'ios' : type; - type = (Platform.isMacOS) ? 'macos' : type; - type = (Platform.isAndroid) ? 'android' : type; - type = (Platform.isLinux) ? 'linux' : type; - type = (Platform.isWindows) ? 'windows' : type; - type = (Platform.isFuchsia) ? 'fuchsia' : type; + // Platform is not supported in web so if web, set type to web automatically and skip Platform check + if(kIsWeb) { + type = 'web'; + }else{ + type = (Platform.isIOS) ? 'ios' : type; + type = (Platform.isMacOS) ? 'macos' : type; + type = (Platform.isAndroid) ? 'android' : type; + type = (Platform.isLinux) ? 'linux' : type; + type = (Platform.isWindows) ? 'windows' : type; + type = (Platform.isFuchsia) ? 'fuchsia' : type; + } this.headers = { 'content-type': 'application/json', - 'x-sdk-version': 'appwrite:dart:0.2.3', + 'x-sdk-version': 'appwrite:flutter:0.3.0-dev.1', }; this.config = {}; @@ -78,17 +83,20 @@ class Client { Future init() async { if(!initialized) { - final Directory cookieDir = await _getCookiePath(); - - cookieJar = new PersistCookieJar(dir:cookieDir.path); + // if web skip cookie implementation and origin header as those are automatically handled by browsers + if(!kIsWeb) { + final Directory cookieDir = await _getCookiePath(); + cookieJar = new PersistCookieJar(dir:cookieDir.path); + this.http.interceptors.add(CookieManager(cookieJar)); + PackageInfo packageInfo = await PackageInfo.fromPlatform(); + addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName); + }else{ + // if web set httpClientAdapter as BrowserHttpClientAdapter with withCredentials true to make cookies work + this.http.options.extra['withCredentials'] = true; + } this.http.options.baseUrl = this.endPoint; this.http.options.validateStatus = (status) => status < 400; - this.http.interceptors.add(CookieManager(cookieJar)); - - PackageInfo packageInfo = await PackageInfo.fromPlatform(); - - addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName); } } @@ -114,6 +122,10 @@ class Client { } if (method == HttpMethod.get) { + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + return http.get(path, queryParameters: params, options: options); } else { return http.request(path, data: params, options: options); diff --git a/app/sdks/client-flutter/lib/services/avatars.dart b/app/sdks/client-flutter/lib/services/avatars.dart index 16c7ce59ff..a57b3b564c 100644 --- a/app/sdks/client-flutter/lib/services/avatars.dart +++ b/app/sdks/client-flutter/lib/services/avatars.dart @@ -27,6 +27,10 @@ class Avatars extends Service { 'project': client.config['project'], }; + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + Uri endpoint = Uri.parse(client.endPoint); Uri location = new Uri(scheme: endpoint.scheme, host: endpoint.host, @@ -55,6 +59,10 @@ class Avatars extends Service { 'project': client.config['project'], }; + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + Uri endpoint = Uri.parse(client.endPoint); Uri location = new Uri(scheme: endpoint.scheme, host: endpoint.host, @@ -79,6 +87,10 @@ class Avatars extends Service { 'project': client.config['project'], }; + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + Uri endpoint = Uri.parse(client.endPoint); Uri location = new Uri(scheme: endpoint.scheme, host: endpoint.host, @@ -106,6 +118,10 @@ class Avatars extends Service { 'project': client.config['project'], }; + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + Uri endpoint = Uri.parse(client.endPoint); Uri location = new Uri(scheme: endpoint.scheme, host: endpoint.host, @@ -134,6 +150,10 @@ class Avatars extends Service { 'project': client.config['project'], }; + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + Uri endpoint = Uri.parse(client.endPoint); Uri location = new Uri(scheme: endpoint.scheme, host: endpoint.host, @@ -197,6 +217,10 @@ class Avatars extends Service { 'project': client.config['project'], }; + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + Uri endpoint = Uri.parse(client.endPoint); Uri location = new Uri(scheme: endpoint.scheme, host: endpoint.host, diff --git a/app/sdks/client-flutter/lib/services/storage.dart b/app/sdks/client-flutter/lib/services/storage.dart index 696c15ee3a..51f9345050 100644 --- a/app/sdks/client-flutter/lib/services/storage.dart +++ b/app/sdks/client-flutter/lib/services/storage.dart @@ -124,6 +124,10 @@ class Storage extends Service { 'project': client.config['project'], }; + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + Uri endpoint = Uri.parse(client.endPoint); Uri location = new Uri(scheme: endpoint.scheme, host: endpoint.host, @@ -154,6 +158,10 @@ class Storage extends Service { 'project': client.config['project'], }; + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + Uri endpoint = Uri.parse(client.endPoint); Uri location = new Uri(scheme: endpoint.scheme, host: endpoint.host, @@ -178,6 +186,10 @@ class Storage extends Service { 'project': client.config['project'], }; + params.keys.forEach((key) {if (params[key] is int || params[key] is double) { + params[key] = params[key].toString(); + }}); + Uri endpoint = Uri.parse(client.endPoint); Uri location = new Uri(scheme: endpoint.scheme, host: endpoint.host, diff --git a/app/sdks/client-flutter/pubspec.yaml b/app/sdks/client-flutter/pubspec.yaml index 91a884cd2d..2d0c2fe412 100644 --- a/app/sdks/client-flutter/pubspec.yaml +++ b/app/sdks/client-flutter/pubspec.yaml @@ -1,5 +1,5 @@ name: appwrite -version: 0.2.3 +version: 0.3.0-dev.1 description: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API homepage: https://appwrite.io repository: https://github.com/appwrite/sdk-for-flutter @@ -9,30 +9,15 @@ environment: sdk: '>=2.6.0 <3.0.0' dependencies: meta: ^1.1.8 - path_provider: ^1.6.5 - package_info: ^0.4.0+16 - dio: ^3.0.0 - cookie_jar: ^1.0.0 + path_provider: ^1.6.14 + package_info: ^0.4.3 + dio: ^3.0.10 + cookie_jar: ^1.0.1 dio_cookie_manager: ^1.0.0 flutter_web_auth: ^0.2.4 flutter: sdk: flutter - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^0.1.2 - dev_dependencies: flutter_test: - sdk: flutter - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true \ No newline at end of file + sdk: flutter \ No newline at end of file diff --git a/app/tasks/sdks.php b/app/tasks/sdks.php index bd87ccff93..a8b9cdfdde 100644 --- a/app/tasks/sdks.php +++ b/app/tasks/sdks.php @@ -121,7 +121,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND break; case 'flutter-dev': $config = new Flutter(); - $config->setPackageName('appwrite-dev'); + $config->setPackageName('appwrite_dev'); break; case 'dart': $config = new Dart(); diff --git a/composer.lock b/composer.lock index 43ed0c57b1..147dd918d9 100644 --- a/composer.lock +++ b/composer.lock @@ -146,12 +146,12 @@ "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "95c63ab2117a72f48f5a55da9740a3273d45b7fd" + "reference": "8a7ecad675253e4654ea05505233285377405215" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/95c63ab2117a72f48f5a55da9740a3273d45b7fd", - "reference": "95c63ab2117a72f48f5a55da9740a3273d45b7fd", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/8a7ecad675253e4654ea05505233285377405215", + "reference": "8a7ecad675253e4654ea05505233285377405215", "shasum": "" }, "require": { @@ -194,25 +194,39 @@ "ssl", "tls" ], - "time": "2020-04-08T08:27:21+00:00" + "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": "2020-08-23T12:54:47+00:00" }, { "name": "dasprid/enum", - "version": "1.0.0", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/DASPRiD/Enum.git", - "reference": "631ef6e638e9494b0310837fa531bedd908fc22b" + "reference": "6ccc0d7141a7f149e3c56cb0ce5f05d9152cfd07" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/631ef6e638e9494b0310837fa531bedd908fc22b", - "reference": "631ef6e638e9494b0310837fa531bedd908fc22b", + "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/6ccc0d7141a7f149e3c56cb0ce5f05d9152cfd07", + "reference": "6ccc0d7141a7f149e3c56cb0ce5f05d9152cfd07", "shasum": "" }, "require-dev": { - "phpunit/phpunit": "^6.4", - "squizlabs/php_codesniffer": "^3.1" + "phpunit/phpunit": "^7 | ^8 | ^9", + "squizlabs/php_codesniffer": "^3.4" }, "type": "library", "autoload": { @@ -228,7 +242,8 @@ { "name": "Ben Scholzen 'DASPRiD'", "email": "mail@dasprids.de", - "homepage": "https://dasprids.de/" + "homepage": "https://dasprids.de/", + "role": "Developer" } ], "description": "PHP 7.1 enum implementation", @@ -236,7 +251,7 @@ "enum", "map" ], - "time": "2017-10-25T22:45:27+00:00" + "time": "2020-07-30T16:37:13+00:00" }, { "name": "domnikl/statsd", @@ -638,29 +653,29 @@ }, { "name": "maxmind-db/reader", - "version": "v1.6.0", + "version": "v1.7.0", "source": { "type": "git", "url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git", - "reference": "febd4920bf17c1da84cef58e56a8227dfb37fbe4" + "reference": "942553da239f12051275f9c666538b5dd09e2908" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/febd4920bf17c1da84cef58e56a8227dfb37fbe4", - "reference": "febd4920bf17c1da84cef58e56a8227dfb37fbe4", + "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/942553da239f12051275f9c666538b5dd09e2908", + "reference": "942553da239f12051275f9c666538b5dd09e2908", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.2" }, "conflict": { - "ext-maxminddb": "<1.6.0,>=2.0.0" + "ext-maxminddb": "<1.7.0,>=2.0.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "2.*", "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpcov": "^3.0", - "phpunit/phpunit": "5.*", + "phpunit/phpcov": ">=6.0.0", + "phpunit/phpunit": ">=8.0.0,<10.0.0", "squizlabs/php_codesniffer": "3.*" }, "suggest": { @@ -694,7 +709,7 @@ "geolocation", "maxmind" ], - "time": "2019-12-19T22:59:03+00:00" + "time": "2020-08-07T22:10:05+00:00" }, { "name": "maxmind/web-service-common", @@ -894,6 +909,12 @@ } ], "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "funding": [ + { + "url": "https://github.com/synchro", + "type": "github" + } + ], "time": "2020-05-27T12:24:03+00:00" }, { @@ -1169,12 +1190,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "bc6549d068d0160e0f10f7a5a23c7d1406b95ebe" + "reference": "045643b91eaa34c4c37150ac477765c13552af33" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/bc6549d068d0160e0f10f7a5a23c7d1406b95ebe", - "reference": "bc6549d068d0160e0f10f7a5a23c7d1406b95ebe", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/045643b91eaa34c4c37150ac477765c13552af33", + "reference": "045643b91eaa34c4c37150ac477765c13552af33", "shasum": "" }, "require": { @@ -1246,7 +1267,7 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-08-04T21:02:56+00:00" }, { "name": "symfony/polyfill-intl-normalizer", @@ -1909,7 +1930,7 @@ "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator", - "reference": "404cf6bb4c75f8ae3b2419e04f6afd215ed706a5" + "reference": "dddbc208ff429298f5c1b2b95fc507aa639c8def" }, "require": { "ext-curl": "*", @@ -1939,7 +1960,7 @@ } ], "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", - "time": "2020-07-26T07:11:06+00:00" + "time": "2020-09-03T13:22:30+00:00" }, { "name": "doctrine/instantiator", @@ -1995,6 +2016,20 @@ "constructor", "instantiate" ], + "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": "2020-06-15T18:51:04+00:00" }, { @@ -2112,12 +2147,12 @@ "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5" + "reference": "a3409d10079990eeb489c3fead0ac070b5b38895" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", - "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/a3409d10079990eeb489c3fead0ac070b5b38895", + "reference": "a3409d10079990eeb489c3fead0ac070b5b38895", "shasum": "" }, "require": { @@ -2152,7 +2187,13 @@ "object", "object graph" ], - "time": "2020-06-29T13:22:24+00:00" + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-08-28T16:31:07+00:00" }, { "name": "phar-io/manifest", @@ -2311,12 +2352,12 @@ "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "1ac416df3f66c542f2d3688925105b539f064b64" + "reference": "f6075926e937828b180e02964e2d2062af8a9537" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/1ac416df3f66c542f2d3688925105b539f064b64", - "reference": "1ac416df3f66c542f2d3688925105b539f064b64", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/f6075926e937828b180e02964e2d2062af8a9537", + "reference": "f6075926e937828b180e02964e2d2062af8a9537", "shasum": "" }, "require": { @@ -2355,34 +2396,33 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2020-07-21T08:16:41+00:00" + "time": "2020-09-02T21:38:01+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "dev-master", + "version": "1.x-dev", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "94f3ddc5d77e49daadadd33b798b933e52dde82c" + "reference": "e21c0bd532911ec05ebc258e4086ea61c86e0750" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/94f3ddc5d77e49daadadd33b798b933e52dde82c", - "reference": "94f3ddc5d77e49daadadd33b798b933e52dde82c", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e21c0bd532911ec05ebc258e4086ea61c86e0750", + "reference": "e21c0bd532911ec05ebc258e4086ea61c86e0750", "shasum": "" }, "require": { - "php": "^7.2", + "php": "^7.2 || ^8.0", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "^7.2", - "mockery/mockery": "~1" + "ext-tokenizer": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { @@ -2401,7 +2441,7 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2020-06-19T19:40:27+00:00" + "time": "2020-09-02T21:29:45+00:00" }, { "name": "phpspec/prophecy", @@ -2671,7 +2711,7 @@ }, { "name": "phpunit/php-token-stream", - "version": "3.1.1", + "version": "3.1.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", @@ -2716,6 +2756,7 @@ "keywords": [ "tokenizer" ], + "abandoned": true, "time": "2019-09-17T06:23:10+00:00" }, { @@ -3593,7 +3634,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.13-dev" + "dev-master": "2.14-dev" } }, "autoload": { diff --git a/docs/sdks/flutter-dev/CHANGELOG.md b/docs/sdks/flutter-dev/CHANGELOG.md index 36f7668043..ff6f7fa1a7 100644 --- a/docs/sdks/flutter-dev/CHANGELOG.md +++ b/docs/sdks/flutter-dev/CHANGELOG.md @@ -1,3 +1,16 @@ +## 0.3.2 + +- Fixed package namespaces + +## 0.3.1 + +- Downgraded meta package version to 1.1.8 + +## 0.3.0 + +- Updated package dependencies (@lohanidamodar) +- Added Flutter for Web compatibility (@lohanidamodar) + ## 0.2.3 - Fixed OAuth2 cookie bug, where a new session cookie couldn't overwrite an old cookie diff --git a/docs/sdks/flutter/CHANGELOG.md b/docs/sdks/flutter/CHANGELOG.md index 36f7668043..c252451f3f 100644 --- a/docs/sdks/flutter/CHANGELOG.md +++ b/docs/sdks/flutter/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.3.0-dev.1 + +- Updated package dependencies (@lohanidamodar) +- Added Flutter for Web compatibility (@lohanidamodar) + ## 0.2.3 - Fixed OAuth2 cookie bug, where a new session cookie couldn't overwrite an old cookie