From 7d2e61abbb1c65403bd361a03674abbe5a3e6880 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Mon, 19 Oct 2026 14:45:46 -0500 Subject: [PATCH] Correct docs for `/redact_status` `failed_redactions`/`error` (#20380) Spawning from looking at these docs while looking at this area in https://github.com/element-hq/synapse/pull/20379 --- changelog.d/20380.doc | 1 + docs/admin_api/user_admin_api.md | 14 +++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 changelog.d/20380.doc diff --git a/changelog.d/20380.doc b/changelog.d/20380.doc new file mode 100644 index 0000000000..de359fad75 --- /dev/null +++ b/changelog.d/20380.doc @@ -0,0 +1 @@ +Update `/redact_status` admin API docs to reflect better response example and document the `error` field. diff --git a/docs/admin_api/user_admin_api.md b/docs/admin_api/user_admin_api.md index accc2b1db4..1acd3f1b53 100644 --- a/docs/admin_api/user_admin_api.md +++ b/docs/admin_api/user_admin_api.md @@ -1585,8 +1585,8 @@ A response body like the following is returned: ``` { - "status": "active", - "failed_redactions": [], + "status": "complete", + "failed_redactions": {}, } ``` @@ -1601,8 +1601,12 @@ The following parameters should be set in the URL: The following fields are returned in the JSON response body: -- `status` - string - one of `scheduled`/`active`/`complete`/`failed`, indicating the status of the redaction job -- `failed_redactions` - dictionary - the keys of the dict are event ids the process was unable to redact, if any, and the values are - the corresponding error that caused the redaction to fail +- `status` - string (required) - one of `scheduled`/`active`/`complete`/`failed`, + indicating the status of the redaction job +- `failed_redactions` - dictionary (optional) - when the redaction status is `complete`, + contains the keys of the dict are event ids the process was unable to redact, if any, + and the values are the corresponding error that caused the redaction to fail +- `error` - string (optional) - when the redaction `status` is `failed`, this field will + contains a description of the error encountered during the redaction process. _Added in Synapse 1.116.0._