aboutsummaryrefslogtreecommitdiff
path: root/docs/API/admin_api.md
diff options
context:
space:
mode:
authorRoman Chvanikov <chvanikoff@pm.me>2020-06-23 20:56:55 +0300
committerRoman Chvanikov <chvanikoff@pm.me>2020-06-23 20:56:55 +0300
commit1471b70ef1550df91687276968108231f1bab604 (patch)
tree3a59e7497d665d5ce3d6445132453518bc50601d /docs/API/admin_api.md
parent604a83ae3efe21b231fb524203a883a062102546 (diff)
parentc7d69e925664ce7125c3938c298d72e94a2a1349 (diff)
downloadpleroma-1471b70ef1550df91687276968108231f1bab604.tar.gz
Merge develop
Diffstat (limited to 'docs/API/admin_api.md')
-rw-r--r--docs/API/admin_api.md120
1 files changed, 94 insertions, 26 deletions
diff --git a/docs/API/admin_api.md b/docs/API/admin_api.md
index 7b423653b..baf895d90 100644
--- a/docs/API/admin_api.md
+++ b/docs/API/admin_api.md
@@ -488,35 +488,39 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret
### Change the user's email, password, display and settings-related fields
-- Params:
- - `email`
- - `password`
- - `name`
- - `bio`
- - `avatar`
- - `locked`
- - `no_rich_text`
- - `default_scope`
- - `banner`
- - `hide_follows`
- - `hide_followers`
- - `hide_followers_count`
- - `hide_follows_count`
- - `hide_favorites`
- - `allow_following_move`
- - `background`
- - `show_role`
- - `skip_thread_containment`
- - `fields`
- - `discoverable`
- - `actor_type`
-
-- Response:
+* Params:
+ * `email`
+ * `password`
+ * `name`
+ * `bio`
+ * `avatar`
+ * `locked`
+ * `no_rich_text`
+ * `default_scope`
+ * `banner`
+ * `hide_follows`
+ * `hide_followers`
+ * `hide_followers_count`
+ * `hide_follows_count`
+ * `hide_favorites`
+ * `allow_following_move`
+ * `background`
+ * `show_role`
+ * `skip_thread_containment`
+ * `fields`
+ * `discoverable`
+ * `actor_type`
+
+* Responses:
+
+Status: 200
```json
{"status": "success"}
```
+Status: 400
+
```json
{"errors":
{"actor_type": "is invalid"},
@@ -525,8 +529,10 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret
}
```
+Status: 404
+
```json
-{"error": "Unable to update user."}
+{"error": "Not found"}
```
## `GET /api/pleroma/admin/reports`
@@ -1228,4 +1234,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"
+ ]
+}
+
+```