Deletes documents in a database after a specified retention period.
- Deletes all documents within a database that are older than the retention period.
Response
Sample 200
Response: Cleaning Finished.
Setting | Value |
---|---|
Runtime | Node (18.0) |
Entrypoint | src/main.js |
Build Commands | npm install |
Permissions | any |
Timeout (Seconds) | 15 |
Your Appwrite project's API key.
Question | Answer |
---|---|
Required | Yes |
Sample Value | 083d341ee48... |
Documentation | Appwrite: Create an API key |
The endpoint where your Appwrite server is located. If not provided, it defaults to the Appwrite Cloud server: https://cloud.appwrite.io/v1
.
Question | Answer |
---|---|
Required | No |
Sample Value | https://cloud.appwrite.io/v1 |
The ID of the database to wipe documents from.
Question | Answer |
---|---|
Required | Yes |
Sample Value | main |
The ID of the collection to wipe documents from.
Question | Answer |
---|---|
Required | Yes |
Sample Value | profiles |
The number of days you want to retain a document. If not provided, it defaults to 30 days. Only documents older than this period will be deleted.
Question | Answer |
---|---|
Required | No |
Sample Value | 1 |