Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ Tooling section:

Advanced section:

- [Platform](https://appwrite.io/docs/advanced/platform)
- [Billing](https://appwrite.io/docs/advanced/billing)
- [API integration](https://appwrite.io/docs/advanced/api-integration)
- [Migrations](https://appwrite.io/docs/advanced/migrations)
- [Self-hosting](https://appwrite.io/docs/advanced/self-hosting)
- [Security](https://appwrite.io/docs/advanced/security)
Expand Down Expand Up @@ -214,7 +215,7 @@ Split content such that each piece makes sense without reading dependents or exp
- [ ] Point Cloud to new version in [src/routes/docs/references/[version]/[platform]/[service]/+page.server.ts](src/routes/docs/references/[version]/[platform]/[service]/+page.server.ts)
- [ ] Update install command in [/workspaces/website/src/routes/docs/advanced/self-hosting/+page.markdoc](/workspaces/website/src/routes/docs/advanced/self-hosting/+page.markdoc)
- [ ] Update events [src/partials/[product]-events.md](src/partials/)
- [ ] Update response code [src/routes/docs/advanced/platform/response-codes/+page.markdoc](src/routes/docs/advanced/platform/response-codes/+page.markdoc)
- [ ] Update response code [src/routes/docs/advanced/api-integration/response-codes/+page.markdoc](src/routes/docs/advanced/api-integration/response-codes/+page.markdoc)
- [ ] Bump latest SDK versions in SDKs page, quick start, and tutorials
- [ ] Create new sections for new products
- [ ] Create new concept and journey pages for new features
Expand Down
2 changes: 1 addition & 1 deletion src/partials/account-vs-user.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% info title="Account vs Users API" %}
The Account API is the API you should use in your **client applications** with [Client SDKs](/docs/sdks#client) like web, Flutter, mobile, and native apps.
Account API creates sessions, which represent an authenticated user and is attached to a user's [account](/docs/products/auth/accounts).
Sessions respect [permissions](/docs/advanced/platform/permissions), which means users can only access resources if they have been granted the correct permissions.
Sessions respect [permissions](/docs/advanced/security/permissions), which means users can only access resources if they have been granted the correct permissions.

The Users API is a dedicated API for managing users from an admin's perspective.
It should be used with backend or server-side applications with [Server SDKs](/docs/sdks#server). Users API uses API keys instead of sessions.
Expand Down
4 changes: 2 additions & 2 deletions src/partials/auth-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You can change the session limit in the **Security** tab of the Auth Service in
# Permissions {% #permissions %}

Security is very important to protect users' data and privacy.
Appwrite uses a [permissions model](/docs/advanced/platform/permissions) coupled with user sessions to ensure users need correct permissions to access resources.
Appwrite uses a [permissions model](/docs/advanced/security/permissions) coupled with user sessions to ensure users need correct permissions to access resources.
With all Appwrite services, including databases and storage, access is granted at the collection, bucket, document, or file level.
These permissions are enforced for client SDKs and server SDKs when using JWT, but are ignored when using a server SDK with an API key.

Expand All @@ -34,7 +34,7 @@ Password history can be enabled in the Auth service's **Security** tab on the Ap

# Password dictionary {% #password-dictionary %}

Password dictionary protects users from using bad passwords. It compares the user's password to the [10,000 most common passwords](https://github.com/danielmiessler/SecLists/blob/master/Passwords/Common-Credentials/10k-most-common.txt) and throws an error if there's a match. Together with [rate limits](/docs/advanced/platform/rate-limits), password dictionary will significantly reduce the chance of a malicious actor guessing user passwords.
Password dictionary protects users from using bad passwords. It compares the user's password to the [10,000 most common passwords](https://github.com/danielmiessler/SecLists/blob/master/Passwords/Common-Credentials/10k-most-common.txt) and throws an error if there's a match. Together with [rate limits](/docs/advanced/security/rate-limits), password dictionary will significantly reduce the chance of a malicious actor guessing user passwords.

Password dictionary can be enabled in the Auth service's **Security** tab on the Appwrite Console.

Expand Down
142 changes: 133 additions & 9 deletions src/redirects.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,15 @@
},
{
"link": "/docs/keys",
"redirect": "/docs/advanced/platform/api-keys"
"redirect": "/docs/advanced/security/api-keys"
},
{
"link": "/docs/permissions",
"redirect": "/docs/advanced/platform/permissions"
"redirect": "/docs/advanced/security/permissions"
},
{
"link": "/docs/events",
"redirect": "/docs/advanced/platform/events"
"redirect": "/docs/advanced/api-integration/events"
},
{
"link": "/docs/queries",
Expand All @@ -221,23 +221,23 @@
},
{
"link": "/docs/webhooks",
"redirect": "/docs/advanced/platform/webhooks"
"redirect": "/docs/advanced/api-integration/webhooks"
},
{
"link": "/docs/custom-domains",
"redirect": "/docs/advanced/platform/custom-domains"
"redirect": "/docs/products/network/custom-domains"
},
{
"link": "/docs/email-and-sms-templates",
"redirect": "/docs/advanced/platform/message-templates"
"redirect": "/docs/products/auth/message-templates"
},
{
"link": "/docs/response-codes",
"redirect": "/docs/advanced/platform/response-codes"
"redirect": "/docs/advanced/api-integration/response-codes"
},
{
"link": "/docs/rate-limits",
"redirect": "/docs/advanced/platform/rate-limits"
"redirect": "/docs/advanced/security/rate-limits"
},
{
"link": "/docs/configuration",
Expand Down Expand Up @@ -445,7 +445,7 @@
},
{
"link": "/docs/permissions/",
"redirect": "/docs/advanced/platform/permissions"
"redirect": "/docs/advanced/security/permissions"
},
{
"link": "/docs/models/bucket",
Expand Down Expand Up @@ -915,5 +915,129 @@
{
"link": "/heroes",
"redirect": "/"
},
{
"link": "/docs/advanced/platform",
"redirect": "/docs"
},
{
"link": "/docs/advanced/platform/billing",
"redirect": "/docs/advanced/billing/payments"
},
{
"link": "/docs/advanced/platform/free",
"redirect": "/docs/advanced/billing/free"
},
{
"link": "/docs/advanced/platform/pro",
"redirect": "/docs/advanced/billing/pro"
},
{
"link": "/docs/advanced/platform/scale",
"redirect": "/docs/advanced/billing/scale"
},
{
"link": "/docs/advanced/platform/enterprise",
"redirect": "/docs/advanced/billing/enterprise"
},
{
"link": "/docs/advanced/platform/oss",
"redirect": "/docs/advanced/billing/oss"
},
{
"link": "/docs/advanced/platform/compute",
"redirect": "/docs/advanced/billing/compute"
},
{
"link": "/docs/advanced/platform/phone-otp",
"redirect": "/docs/advanced/billing/phone-otp"
},
{
"link": "/docs/advanced/platform/image-transformations",
"redirect": "/docs/advanced/billing/image-transformations"
},
{
"link": "/docs/advanced/platform/database-reads-and-writes",
"redirect": "/docs/advanced/billing/database-reads-and-writes"
},
{
"link": "/docs/advanced/platform/support-sla",
"redirect": "/docs/advanced/billing/support-sla"
},
{
"link": "/docs/advanced/platform/uptime-sla",
"redirect": "/docs/advanced/billing/uptime-sla"
},
{
"link": "/docs/advanced/platform/fair-use-policy",
"redirect": "/docs/advanced/billing/fair-use-policy"
},
{
"link": "/docs/advanced/platform/abuse",
"redirect": "/docs/advanced/billing/abuse"
},
{
"link": "/docs/advanced/platform/refund-policy",
"redirect": "/docs/advanced/billing/refund-policy"
},
{
"link": "/docs/advanced/platform/events",
"redirect": "/docs/advanced/api-integration/events"
},
{
"link": "/docs/advanced/platform/webhooks",
"redirect": "/docs/advanced/api-integration/webhooks"
},
{
"link": "/docs/advanced/platform/response-codes",
"redirect": "/docs/advanced/api-integration/response-codes"
},
{
"link": "/docs/advanced/platform/error-handling",
"redirect": "/docs/advanced/api-integration/error-handling"
},
{
"link": "/docs/advanced/platform/release-policy",
"redirect": "/docs/advanced/api-integration/release-policy"
},
{
"link": "/docs/advanced/platform/permissions",
"redirect": "/docs/advanced/security/permissions"
},
{
"link": "/docs/advanced/platform/rate-limits",
"redirect": "/docs/advanced/security/rate-limits"
},
{
"link": "/docs/advanced/platform/api-keys",
"redirect": "/docs/advanced/security/api-keys"
},
{
"link": "/docs/advanced/platform/dev-keys",
"redirect": "/docs/advanced/security/dev-keys"
},
{
"link": "/docs/advanced/platform/roles",
"redirect": "/docs/advanced/security/roles"
},
{
"link": "/docs/advanced/platform/message-templates",
"redirect": "/docs/products/auth/message-templates"
},
{
"link": "/docs/advanced/platform/custom-domains",
"redirect": "/docs/products/network/custom-domains"
},
{
"link": "/docs/advanced/platform/shortcuts",
"redirect": "/docs/tooling/command-center/shortcuts"
},
{
"link": "/docs/advanced/platform/environment-variables",
"redirect": "/docs/advanced/security/environment-variables"
},
{
"link": "/docs/advanced/integration",
"redirect": "/docs/advanced/api-integration"
}
]
2 changes: 1 addition & 1 deletion src/routes/(init)/init/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
},
{
title: 'Dev Keys',
url: '/docs/advanced/platform/dev-keys',
url: '/docs/advanced/security/dev-keys',
type: 'Docs',
label: 'Visit docs'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ A backend platform should handle the following by default:
- Rate limiting on authentication endpoints
- Session management with configurable expiry

Appwrite's [permissions model](/docs/products/databases/permissions) operates at the table and row-level. Combined with [roles and labels](/docs/products/auth/roles) on user accounts, you can model granular access patterns without writing custom middleware for every endpoint.
Appwrite's [permissions model](/docs/products/databases/permissions) operates at the table and row-level. Combined with [roles and labels](/docs/advanced/security/roles) on user accounts, you can model granular access patterns without writing custom middleware for every endpoint.

# Scalability from first commit to production

Expand Down
15 changes: 11 additions & 4 deletions src/routes/docs/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@
{
label: 'Command Center',
href: '/docs/tooling/command-center',
icon: 'web-icon-command'
icon: 'web-icon-command',
isParent: true
},
{
label: 'The Appwriter',
Expand All @@ -165,9 +166,9 @@
label: 'Advanced',
items: [
{
label: 'Platform',
href: '/docs/advanced/platform',
icon: 'web-icon-platform',
label: 'Billing',
href: '/docs/advanced/billing',
icon: 'icon-credit-card',
isParent: true
},
{
Expand All @@ -176,6 +177,12 @@
icon: 'icon-share',
isParent: true
},
{
label: 'API Integration',
href: '/docs/advanced/api-integration',
icon: 'icon-switch-horizontal',
isParent: true
},
{
label: 'Migrations',
href: '/docs/advanced/migrations',
Expand Down
61 changes: 61 additions & 0 deletions src/routes/docs/advanced/api-integration/+layout.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<script lang="ts">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this page could be a container for simply just APIs and we can drop the integration part. Maybe have some overview of the different APIs types Appwrite support and why we offer different types. We can still link to the different API types directly from the main navigation like we do now.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can even use the existing /docs/apis path.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had thought about that but right now the APIs section is structured to contain info on the different protocols.

This broadens the scope of the section. If that is alright, I can directly shift these there.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can, it really make sense the more I look at the content. We can have a sub category for protocols and around them all the common things like response models or events, links structure will also work really well this way.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gotten a version of this ready, need a review

import Docs from '$lib/layouts/Docs.svelte';
import Sidebar, { type NavParent, type NavTree } from '$lib/layouts/Sidebar.svelte';

const parent: NavParent = {
href: '/docs',
label: 'API integration'
};

const navigation: NavTree = [
{
label: 'Getting started',
items: [
{
label: 'Overview',
href: '/docs/advanced/api-integration'
}
]
},
{
label: 'Events and webhooks',
items: [
{
label: 'Events',
href: '/docs/advanced/api-integration/events'
},
{
label: 'Webhooks',
href: '/docs/advanced/api-integration/webhooks'
}
]
},
{
label: 'Error reference',
items: [
{
label: 'Response codes',
href: '/docs/advanced/api-integration/response-codes'
},
{
label: 'Error handling',
href: '/docs/advanced/api-integration/error-handling'
}
]
},
{
label: 'Policies',
items: [
{
label: 'Release policy',
href: '/docs/advanced/api-integration/release-policy'
}
]
}
];
</script>

<Docs variant="two-side-navs">
<Sidebar {navigation} {parent} />
<slot />
</Docs>
43 changes: 43 additions & 0 deletions src/routes/docs/advanced/api-integration/+page.markdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
layout: article
title: API integration
description: Integrate Appwrite with your apps using events and webhooks, and learn how Appwrite's APIs report response codes and errors.
---

Appwrite is designed to integrate with both your frontend and backend apps. Learn how to react to platform events, keep external systems in sync with webhooks, and handle the response codes and errors returned by Appwrite's APIs.

# Events and webhooks {% #events-and-webhooks %}

React to events that occur across your Appwrite project and notify external systems.

{% cards %}
{% cards_item href="/docs/advanced/api-integration/events" title="Events" %}
Appwrite allows you to react to events that occur on the platform.
{% /cards_item %}

{% cards_item href="/docs/advanced/api-integration/webhooks" title="Webhooks" %}
Use webhooks to update backend integrations about Appwrite events.
{% /cards_item %}
{% /cards %}

# Error reference {% #error-reference %}

Understand how Appwrite's APIs report success and failure, and how to handle errors gracefully.

{% cards %}
{% cards_item href="/docs/advanced/api-integration/response-codes" title="Response codes" %}
Learn about response codes and errors returned by Appwrite APIs.
{% /cards_item %}

{% cards_item href="/docs/advanced/api-integration/error-handling" title="Error handling" %}
Best practices for handling Appwrite errors in your applications.
{% /cards_item %}
{% /cards %}

# Policies {% #policies %}

{% cards %}
{% cards_item href="/docs/advanced/api-integration/release-policy" title="Release policy" %}
Understand how Appwrite releases and versions its platforms and APIs.
{% /cards_item %}
{% /cards %}
Loading
Loading