Skip to content

Commit 94445b3

Browse files
committed
Add full schema collection create
1 parent b0a3ffd commit 94445b3

18 files changed

Lines changed: 56 additions & 16 deletions

docs/databases.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections
186186
| permissions | array | An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). | |
187187
| documentSecurity | boolean | Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions). | |
188188
| enabled | boolean | Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled. | 1 |
189+
| attributes | array | Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options. | [] |
190+
| indexes | array | Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional). | [] |
189191

190192

191193
```http request

docs/examples/account/create-anonymous-session.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use Appwrite\Services\Account;
55
66
$client = (new Client())
77
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8-
->setProject('<YOUR_PROJECT_ID>'); // Your project ID
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setSession(''); // The user session to authenticate with
910

1011
$account = new Account($client);
1112

docs/examples/account/create-email-password-session.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use Appwrite\Services\Account;
55
66
$client = (new Client())
77
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8-
->setProject('<YOUR_PROJECT_ID>'); // Your project ID
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setSession(''); // The user session to authenticate with
910

1011
$account = new Account($client);
1112

docs/examples/account/create-email-token.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use Appwrite\Services\Account;
55
66
$client = (new Client())
77
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8-
->setProject('<YOUR_PROJECT_ID>'); // Your project ID
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setSession(''); // The user session to authenticate with
910

1011
$account = new Account($client);
1112

docs/examples/account/create-jwt.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use Appwrite\Services\Account;
55
66
$client = (new Client())
77
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8-
->setProject('<YOUR_PROJECT_ID>'); // Your project ID
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setSession(''); // The user session to authenticate with
910

1011
$account = new Account($client);
1112

docs/examples/account/create-magic-url-token.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use Appwrite\Services\Account;
55
66
$client = (new Client())
77
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8-
->setProject('<YOUR_PROJECT_ID>'); // Your project ID
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setSession(''); // The user session to authenticate with
910

1011
$account = new Account($client);
1112

docs/examples/account/create-mfa-challenge.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ use Appwrite\Enums\AuthenticationFactor;
66
77
$client = (new Client())
88
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
9-
->setProject('<YOUR_PROJECT_ID>'); // Your project ID
9+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
10+
->setSession(''); // The user session to authenticate with
1011

1112
$account = new Account($client);
1213

docs/examples/account/create-o-auth-2-token.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ use Appwrite\Enums\OAuthProvider;
66
77
$client = (new Client())
88
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
9-
->setProject('<YOUR_PROJECT_ID>'); // Your project ID
9+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
10+
->setSession(''); // The user session to authenticate with
1011

1112
$account = new Account($client);
1213

docs/examples/account/create-phone-token.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use Appwrite\Services\Account;
55
66
$client = (new Client())
77
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8-
->setProject('<YOUR_PROJECT_ID>'); // Your project ID
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setSession(''); // The user session to authenticate with
910

1011
$account = new Account($client);
1112

docs/examples/account/create-session.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use Appwrite\Services\Account;
55
66
$client = (new Client())
77
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8-
->setProject('<YOUR_PROJECT_ID>'); // Your project ID
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setSession(''); // The user session to authenticate with
910

1011
$account = new Account($client);
1112

0 commit comments

Comments
 (0)