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/API | |
parent | 436bb0cd12825b3202a46dbc04cd063935e40344 (diff) | |
parent | 4044f24e2e4935757e038e7f06373ed1c9172560 (diff) | |
download | pleroma-f9282677731cca96a1316e2830507837535c06e0.tar.gz |
Merge branch 'issue/1855' into 'develop'
#1855 MediaProxy cache invalidation via Admin API
See merge request pleroma/pleroma!2648
Diffstat (limited to 'docs/API')
-rw-r--r-- | docs/API/admin_api.md | 64 |
1 files changed, 63 insertions, 1 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" + ] +} + +``` |