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._