Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor/
composer.lock
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
# Change Log

## 19.1.1

* Update SDK as per latest server specs, these include -
* Updates to Runtime enums
* `Output` is now renamed to `ImageFormat` - Note that this is a breaking change
* Introduces Backups module for managing Database backups
* Introduces Organization module

## 19.1.0

* Added ability to create columns and indexes synchronously while creating a table

## 19.0.0

* Rename `VCSDeploymentType` enum to `VCSReferenceType`
* Change `createTemplateDeployment` method signature: replace `version` parameter with `type` (TemplateReferenceType) and `reference` parameters
* Change `createTemplateDeployment` method signature: replace `version` parameter with `type` (TemplateReferenceType)
and `reference` parameters
* Add `Theme`, `Timezone` and `Output` enums

## 18.0.1
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2025 Appwrite (https://appwrite.io) and individual contributors.
Copyright (c) 2026 Appwrite (https://appwrite.io) and individual contributors.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Appwrite PHP SDK

![License](https://img.shields.io/github/license/appwrite/sdk-for-php.svg?style=flat-square&v=1)
![Version](https://img.shields.io/badge/api%20version-1.8.0-blue.svg?style=flat-square&v=1)
![Version](https://img.shields.io/badge/api%20version-1.8.1-blue.svg?style=flat-square&v=1)
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-php/releases).**
**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-php/releases).**

Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the PHP SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the PHP SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)

![Appwrite](https://github.com/appwrite/appwrite/raw/main/public/images/github.png)

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "appwrite/appwrite",
"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",
"description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
"type": "library",
"license": "BSD-3-Clause",
"support": {
Expand All @@ -16,13 +16,13 @@
}
},
"require": {
"php": ">=7.1.0",
"php": ">=8.0.0",
"ext-curl": "*",
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^10",
"mockery/mockery": "^1.6.12"
"mockery/mockery": "1.6.12"
},
"minimum-stability": "dev"
}
6 changes: 6 additions & 0 deletions docs/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ POST https://cloud.appwrite.io/v1/account/jwts

** Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame. **
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Update the description to reflect configurable JWT duration.

The description states the JWT is valid for "15 minutes" as a fixed value, but the new duration parameter (lines 76-81) allows customization up to 3600 seconds (1 hour). Consider revising to indicate that the duration is configurable with a default of 15 minutes.

📝 Suggested revision
-** Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame. **
+** Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for the specified duration (default 15 minutes, maximum 1 hour) from its creation and will be invalid if the user will logout in that time frame. **
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

74-74: Spaces inside emphasis markers

(MD037, no-space-in-emphasis)


74-74: Spaces inside emphasis markers

(MD037, no-space-in-emphasis)

🤖 Prompt for AI Agents
In `@docs/account.md` at line 74, The description incorrectly states a fixed
15-minute JWT lifetime; update the text to state that the JWT lifetime is
configurable via the duration parameter (named "duration") with a default of 15
minutes and a maximum of 3600 seconds (1 hour), so change the sentence
mentioning "15 minutes" to reflect that it's the default and can be extended up
to 3600 seconds using the duration parameter.


### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| duration | integer | Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds. | 900 |


```http request
GET https://cloud.appwrite.io/v1/account/logs
Expand Down
172 changes: 172 additions & 0 deletions docs/backups.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# Backups Service


```http request
GET https://cloud.appwrite.io/v1/backups/archives
```

** List all archives for a project. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. | [] |


```http request
POST https://cloud.appwrite.io/v1/backups/archives
```

** Create a new archive asynchronously for a project. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| services | array | Array of services to backup | |
| resourceId | string | Resource ID. When set, only this single resource will be backed up. | |


```http request
GET https://cloud.appwrite.io/v1/backups/archives/{archiveId}
```

** Get a backup archive using it's ID. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| archiveId | string | **Required** Archive ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | |
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix unmatched backtick in description.

The description has an unmatched backtick: "Choose a custom ID`." This should be either "Choose a custom ID." or properly paired backticks if code formatting is intended.

📝 Proposed fix
-| archiveId | string | **Required** Archive ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. |  |
+| archiveId | string | **Required** Archive ID. Choose a custom ID. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. |  |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| archiveId | string | **Required** Archive ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | |
| archiveId | string | **Required** Archive ID. Choose a custom ID. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | |
🤖 Prompt for AI Agents
In `@docs/backups.md` at line 41, The table cell for the archiveId field contains
an unmatched backtick in the description ("Choose a custom ID`."); edit the
archiveId description to remove the stray backtick or properly wrap the phrase
in paired backticks if you intended inline code (e.g., change to "Choose a
custom ID." or "`Choose a custom ID`."), ensuring the sentence punctuation
remains correct and the allowed-chars sentence is unchanged.



```http request
DELETE https://cloud.appwrite.io/v1/backups/archives/{archiveId}
```

** Delete an existing archive for a project. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| archiveId | string | **Required** Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | |
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Incorrect parameter description - copy-paste error.

The description for the archiveId parameter incorrectly states "Policy ID" when it should state "Archive ID". This endpoint deletes an archive, not a policy.

📝 Proposed fix
-| archiveId | string | **Required** Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. |  |
+| archiveId | string | **Required** Archive ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. |  |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| archiveId | string | **Required** Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | |
| archiveId | string | **Required** Archive ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | |
🤖 Prompt for AI Agents
In `@docs/backups.md` at line 54, The table row for the parameter archiveId
incorrectly describes it as a "Policy ID"; update the description for archiveId
to say "Archive ID" (e.g., "Required Archive ID. Choose a custom ID or generate
a random ID with `ID.unique()`. Valid chars are...") so the docs correctly state
this endpoint deletes an archive; adjust only the human-readable label in the
archiveId row in docs/backups.md.



```http request
GET https://cloud.appwrite.io/v1/backups/policies
```

** List all policies for a project. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. | [] |


```http request
POST https://cloud.appwrite.io/v1/backups/policies
```

** Create a new backup policy. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| policyId | string | Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | |
| name | string | Policy name. Max length: 128 chars. | |
| services | array | Array of services to backup | |
| resourceId | string | Resource ID. When set, only this single resource will be backed up. | |
| enabled | boolean | Is policy enabled? When set to 'disabled', no backups will be taken | 1 |
| retention | integer | Days to keep backups before deletion | |
| schedule | string | Schedule CRON syntax. | |


```http request
GET https://cloud.appwrite.io/v1/backups/policies/{policyId}
```

** Get a backup policy using it's ID. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| policyId | string | **Required** Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | |
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix unmatched backtick in description.

Same issue as line 41: "Choose a custom ID`." has an unmatched backtick.

📝 Proposed fix
-| policyId | string | **Required** Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. |  |
+| policyId | string | **Required** Policy ID. Choose a custom ID. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. |  |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| policyId | string | **Required** Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | |
| policyId | string | **Required** Policy ID. Choose a custom ID. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | |
🤖 Prompt for AI Agents
In `@docs/backups.md` at line 99, The "policyId" table row contains an unmatched
backtick in the description ("Choose a custom ID`."); remove the stray backtick
so the sentence reads "Choose a custom ID." and ensure punctuation spacing
remains correct; update the description for the policyId field (policyId) to
match the same corrected wording used earlier (line 41) so there are no stray
backticks in the docs.



```http request
PATCH https://cloud.appwrite.io/v1/backups/policies/{policyId}
```

** Update an existing policy using it's ID. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| policyId | string | **Required** Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | |
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix unmatched backtick in description.

Same issue as lines 41 and 99: "Choose a custom ID`." has an unmatched backtick.

📝 Proposed fix
-| policyId | string | **Required** Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. |  |
+| policyId | string | **Required** Policy ID. Choose a custom ID. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. |  |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| policyId | string | **Required** Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | |
| policyId | string | **Required** Policy ID. Choose a custom ID. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | |
🤖 Prompt for AI Agents
In `@docs/backups.md` at line 112, The "policyId" table row contains an unmatched
backtick in the description ("Choose a custom ID`."); locate the "policyId" cell
in the docs/backups.md table (same pattern as the occurrences referenced at
lines 41 and 99) and remove the stray backtick so the sentence reads "Choose a
custom ID." (or adjust to proper inline code fencing if that was intended),
ensuring no unmatched backticks remain in that cell.

| name | string | Policy name. Max length: 128 chars. | |
| retention | integer | Days to keep backups before deletion | |
| schedule | string | Cron expression | |
| enabled | boolean | Is Backup enabled? When set to 'disabled', No backup will be taken | |


```http request
DELETE https://cloud.appwrite.io/v1/backups/policies/{policyId}
```

** Delete a policy using it's ID. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| policyId | string | **Required** Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | |


```http request
POST https://cloud.appwrite.io/v1/backups/restoration
```

** Create and trigger a new restoration for a backup on a project. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| archiveId | string | Backup archive ID to restore | |
| services | array | Array of services to restore | |
| newResourceId | string | Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | |
| newResourceName | string | Database name. Max length: 128 chars. | |


```http request
GET https://cloud.appwrite.io/v1/backups/restorations
```

** List all backup restorations for a project. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. | [] |


```http request
GET https://cloud.appwrite.io/v1/backups/restorations/{restorationId}
```

** Get the current status of a backup restoration. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| restorationId | string | **Required** Restoration ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | |

4 changes: 3 additions & 1 deletion docs/examples/account/create-jwt.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ $client = (new Client())

$account = new Account($client);

$result = $account->createJWT();
$result = $account->createJWT(
duration: 0 // optional
);
Comment on lines +13 to +15
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Reconsider using duration: 0 in the example.

A duration of 0 would create a JWT that expires immediately, which isn't a practical use case. Consider either:

  1. Omitting the parameter entirely to demonstrate the default behavior (900 seconds)
  2. Using a meaningful value like duration: 1800 (30 minutes)
📝 Suggested fix
 $result = $account->createJWT(
-    duration: 0 // optional
+    duration: 1800 // optional, defaults to 900 seconds (15 minutes)
 );

Or simply:

-$result = $account->createJWT(
-    duration: 0 // optional
-);
+$result = $account->createJWT();
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
$result = $account->createJWT(
duration: 0 // optional
);
$result = $account->createJWT(
duration: 1800 // optional, defaults to 900 seconds (15 minutes)
);
Suggested change
$result = $account->createJWT(
duration: 0 // optional
);
$result = $account->createJWT();
🤖 Prompt for AI Agents
In `@docs/examples/account/create-jwt.md` around lines 13 - 15, In the example
calling $account->createJWT, don't use duration: 0 (it makes the token
immediately expired); either remove the duration parameter to show the default
900s behavior or replace it with a sensible value such as duration: 1800 (30
minutes) so the example demonstrates a practical JWT lifetime.

4 changes: 2 additions & 2 deletions docs/examples/avatars/get-screenshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use Appwrite\Client;
use Appwrite\Services\Avatars;
use Appwrite\Enums\Theme;
use Appwrite\Enums\Timezone;
use Appwrite\Enums\Output;
use Appwrite\Enums\ImageFormat;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand Down Expand Up @@ -36,5 +36,5 @@ $result = $avatars->getScreenshot(
width: 800, // optional
height: 600, // optional
quality: 85, // optional
output: Output::JPG() // optional
output: ImageFormat::JPG() // optional
);
16 changes: 16 additions & 0 deletions docs/examples/backups/create-archive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

use Appwrite\Client;
use Appwrite\Services\Backups;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key

$backups = new Backups($client);

$result = $backups->createArchive(
services: [],
resourceId: '<RESOURCE_ID>' // optional
);
21 changes: 21 additions & 0 deletions docs/examples/backups/create-policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

use Appwrite\Client;
use Appwrite\Services\Backups;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key

$backups = new Backups($client);

$result = $backups->createPolicy(
policyId: '<POLICY_ID>',
services: [],
retention: 1,
schedule: '',
name: '<NAME>', // optional
resourceId: '<RESOURCE_ID>', // optional
enabled: false // optional
);
18 changes: 18 additions & 0 deletions docs/examples/backups/create-restoration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

use Appwrite\Client;
use Appwrite\Services\Backups;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key

$backups = new Backups($client);

$result = $backups->createRestoration(
archiveId: '<ARCHIVE_ID>',
services: [],
newResourceId: '<NEW_RESOURCE_ID>', // optional
newResourceName: '<NEW_RESOURCE_NAME>' // optional
);
15 changes: 15 additions & 0 deletions docs/examples/backups/delete-archive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

use Appwrite\Client;
use Appwrite\Services\Backups;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key

$backups = new Backups($client);

$result = $backups->deleteArchive(
archiveId: '<ARCHIVE_ID>'
);
15 changes: 15 additions & 0 deletions docs/examples/backups/delete-policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

use Appwrite\Client;
use Appwrite\Services\Backups;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key

$backups = new Backups($client);

$result = $backups->deletePolicy(
policyId: '<POLICY_ID>'
);
15 changes: 15 additions & 0 deletions docs/examples/backups/get-archive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

use Appwrite\Client;
use Appwrite\Services\Backups;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key

$backups = new Backups($client);

$result = $backups->getArchive(
archiveId: '<ARCHIVE_ID>'
);
Loading