diff options
| author | feld <feld@feld.me> | 2020-06-19 20:38:22 +0000 |
|---|---|---|
| committer | feld <feld@feld.me> | 2020-06-19 20:38:22 +0000 |
| commit | f9282677731cca96a1316e2830507837535c06e0 (patch) | |
| tree | 27e04af4e4fac3e4ed53a653bd1ec293f48410a3 /docs | |
| parent | 436bb0cd12825b3202a46dbc04cd063935e40344 (diff) | |
| parent | 4044f24e2e4935757e038e7f06373ed1c9172560 (diff) | |
| download | pleroma-f9282677731cca96a1316e2830507837535c06e0.tar.gz pleroma-f9282677731cca96a1316e2830507837535c06e0.zip | |
Merge branch 'issue/1855' into 'develop'
#1855 MediaProxy cache invalidation via Admin API
See merge request pleroma/pleroma!2648
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/API/admin_api.md | 64 | ||||
| -rw-r--r-- | docs/configuration/cheatsheet.md | 6 |
2 files changed, 66 insertions, 4 deletions
diff --git a/docs/API/admin_api.md b/docs/API/admin_api.md index 92816baf9..c7f56cf5f 100644 --- a/docs/API/admin_api.md +++ b/docs/API/admin_api.md @@ -1224,4 +1224,66 @@ Loads json generated from `config/descriptions.exs`. - Response: - On success: `204`, empty response - On failure: - - 400 Bad Request `"Invalid parameters"` when `status` is missing
\ No newline at end of file + - 400 Bad Request `"Invalid parameters"` when `status` is missing + +## `GET /api/pleroma/admin/media_proxy_caches` + +### Get a list of all banned MediaProxy URLs in Cachex + +- Authentication: required +- Params: +- *optional* `page`: **integer** page number +- *optional* `page_size`: **integer** number of log entries per page (default is `50`) + +- Response: + +``` json +{ + "urls": [ + "http://example.com/media/a688346.jpg", + "http://example.com/media/fb1f4d.jpg" + ] +} + +``` + +## `POST /api/pleroma/admin/media_proxy_caches/delete` + +### Remove a banned MediaProxy URL from Cachex + +- Authentication: required +- Params: + - `urls` (array) + +- Response: + +``` json +{ + "urls": [ + "http://example.com/media/a688346.jpg", + "http://example.com/media/fb1f4d.jpg" + ] +} + +``` + +## `POST /api/pleroma/admin/media_proxy_caches/purge` + +### Purge a MediaProxy URL + +- Authentication: required +- Params: + - `urls` (array) + - `ban` (boolean) + +- Response: + +``` json +{ + "urls": [ + "http://example.com/media/a688346.jpg", + "http://example.com/media/fb1f4d.jpg" + ] +} + +``` diff --git a/docs/configuration/cheatsheet.md b/docs/configuration/cheatsheet.md index fad67fc4d..6ebdab546 100644 --- a/docs/configuration/cheatsheet.md +++ b/docs/configuration/cheatsheet.md @@ -268,7 +268,7 @@ This section describe PWA manifest instance-specific values. Currently this opti #### Pleroma.Web.MediaProxy.Invalidation.Script -This strategy allow perform external bash script to purge cache. +This strategy allow perform external shell script to purge cache. Urls of attachments pass to script as arguments. * `script_path`: path to external script. @@ -284,8 +284,8 @@ config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script, This strategy allow perform custom http request to purge cache. * `method`: http method. default is `purge` -* `headers`: http headers. default is empty -* `options`: request options. default is empty +* `headers`: http headers. +* `options`: request options. Example: ```elixir |
