- `local`: only local users
- `external`: only external users
- `active`: only active users
+ - `need_approval`: only unapproved users
- `deactivated`: only deactivated users
- `is_admin`: users with admin role
- `is_moderator`: users with moderator role
"local": bool,
"tags": array,
"avatar": string,
- "display_name": string
+ "display_name": string,
+ "confirmation_pending": bool,
+ "approval_pending": bool,
+ "registration_reason": string,
},
...
]
}
```
+## `PATCH /api/pleroma/admin/users/approve`
+
+### Approve user
+
+- Params:
+ - `nicknames`: nicknames array
+- Response:
+
+```json
+{
+ users: [
+ {
+ // user object
+ }
+ ]
+}
+```
+
## `GET /api/pleroma/admin/users/:nickname_or_id`
### Retrive the details of a user
### 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"},
}
```
+Status: 404
+
```json
-{"error": "Unable to update user."}
+{"error": "Not found"}
```
## `GET /api/pleroma/admin/reports`
```json
{
- "totalReports" : 1,
+ "total" : 1,
"reports": [
{
"account": {
- 400 Bad Request `"Invalid parameters"` when `status` is missing
- On success: `204`, empty response
-## `POST /api/pleroma/admin/reports/:report_id/notes/:id`
+## `DELETE /api/pleroma/admin/reports/:report_id/notes/:id`
### Delete report note
### Stats
+- Query Params:
+ - *optional* `instance`: **string** instance hostname (without protocol) to get stats for
+- Example: `https://mypleroma.org/api/pleroma/admin/stats?instance=lain.com`
+
- Response:
```json
- 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`)
+- *optional* `query`: **string** search term
+
+- Response:
+
+``` json
+{
+ "page_size": integer,
+ "count": integer,
+ "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
+{ }
+
+```
+
+## `POST /api/pleroma/admin/media_proxy_caches/purge`
+
+### Purge a MediaProxy URL
+
+- Authentication: required
+- Params:
+ - `urls` (array)
+ - `ban` (boolean)
+
+- Response:
+
+``` json
+{ }
+
+```