get_data_retention, set_data_retention
Read the organization's and your own data retention, and set your own.
Retention has two layers: the organization's setting and your own, which can only be stricter. A request's content is kept for the shorter of the two. See Data retention.
get_data_retention
No arguments. Read-only. Returns organization, organization_retention_days, your_retention_days (null when you follow the organization), effective_retention_days (the shorter; 0 is Zero Data Retention) and a note.
set_data_retention
| Input | Description |
|---|---|
days | Required. 0 (Zero Data Retention), 7, 30, 90 or 365; or null to follow the organization |
Returns the same fields as get_data_retention. Changes only your own account's setting, across all your organizations; never the organization's. A shorter period deletes content already kept beyond it. Ask the user before calling it: "Do you want to be able to view your past requests, or turn on Zero Data Retention?"