---
title: "Get retention checks"
method: GET
path: "/retention/users/checks"
tags: ["data retention"]
---

# Get retention checks

`GET /retention/users/checks`

Returns the active retention checks

## Response `200`

successful operation

- RetentionCheck[]
  - `username` string — username to which the retention check refers
  - `folders` FolderRetention[]
    - `path` string — virtual directory path as seen by users, if no other specific retention is defined, the retention applies for sub directories too. For example if retention is defined for the paths "/" and "/sub" then the retention for "/" is applied for any file outside the "/sub" directory
    - `retention` integer — retention time in hours. All the files with a modification time older than the defined value will be deleted. 0 means exclude this path
    - `delete_empty_dirs` boolean — if enabled, empty directories will be deleted
    - `ignore_user_permissions` boolean — if enabled, files will be deleted even if the user does not have the delete permission. The default is "false" which means that files will be skipped if the user does not have permission to delete them. File patterns filters will always be silently ignored
  - `start_time` integer — check start time as unix timestamp in milliseconds
  - `notifications` RetentionCheckNotification[]
  - `email` string, email — if the notification method is set to "Email", this is the e-mail address that receives the retention check report. This field is automatically set to the email address associated with the administrator starting the check

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal Server Error
- `default` — Unexpected Error

---

[API](https://skmtc.net/kanton-bern/apis/sftpgo.md) · [All operations](https://skmtc.net/kanton-bern/apis/sftpgo/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kanton-bern/sftpgo/revisions/d8d616a479b0/schema)
