projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'features/validators-audio' into 'develop'
[akkoma]
/
docs
/
API
/
admin_api.md
diff --git
a/docs/API/admin_api.md
b/docs/API/admin_api.md
index c7f56cf5f7f249e4e26de74b134ada44aa8a097a..05e63b528cfd529c6b5164bb571f208ada1163dc 100644
(file)
--- a/
docs/API/admin_api.md
+++ b/
docs/API/admin_api.md
@@
-19,6
+19,7
@@
Configuration options:
- `local`: only local users
- `external`: only external users
- `active`: only active users
- `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
- `deactivated`: only deactivated users
- `is_admin`: users with admin role
- `is_moderator`: users with moderator role
@@
-46,7
+47,10
@@
Configuration options:
"local": bool,
"tags": array,
"avatar": string,
"local": bool,
"tags": array,
"avatar": string,
- "display_name": string
+ "display_name": string,
+ "confirmation_pending": bool,
+ "approval_pending": bool,
+ "registration_reason": string,
},
...
]
},
...
]
@@
-242,6
+246,24
@@
Note: Available `:permission_group` is currently moderator and admin. 404 is ret
}
```
}
```
+## `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
## `GET /api/pleroma/admin/users/:nickname_or_id`
### Retrive the details of a user
@@
-488,35
+510,39
@@
Note: Available `:permission_group` is currently moderator and admin. 404 is ret
### Change the user's email, password, display and settings-related fields
### 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"}
```
```json
{"status": "success"}
```
+Status: 400
+
```json
{"errors":
{"actor_type": "is invalid"},
```json
{"errors":
{"actor_type": "is invalid"},
@@
-525,8
+551,10
@@
Note: Available `:permission_group` is currently moderator and admin. 404 is ret
}
```
}
```
+Status: 404
+
```json
```json
-{"error": "
Unable to update user.
"}
+{"error": "
Not found
"}
```
## `GET /api/pleroma/admin/reports`
```
## `GET /api/pleroma/admin/reports`
@@
-1112,6
+1140,10
@@
Loads json generated from `config/descriptions.exs`.
### Stats
### 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:
```json
@@
-1234,11
+1266,14
@@
Loads json generated from `config/descriptions.exs`.
- Params:
- *optional* `page`: **integer** page number
- *optional* `page_size`: **integer** number of log entries per page (default is `50`)
- 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
{
- Response:
``` json
{
+ "page_size": integer,
+ "count": integer,
"urls": [
"http://example.com/media/a688346.jpg",
"http://example.com/media/fb1f4d.jpg"
"urls": [
"http://example.com/media/a688346.jpg",
"http://example.com/media/fb1f4d.jpg"
@@
-1258,12
+1293,7
@@
Loads json generated from `config/descriptions.exs`.
- Response:
``` json
- Response:
``` json
-{
- "urls": [
- "http://example.com/media/a688346.jpg",
- "http://example.com/media/fb1f4d.jpg"
- ]
-}
+{ }
```
```
@@
-1279,11
+1309,6
@@
Loads json generated from `config/descriptions.exs`.
- Response:
``` json
- Response:
``` json
-{
- "urls": [
- "http://example.com/media/a688346.jpg",
- "http://example.com/media/fb1f4d.jpg"
- ]
-}
+{ }
```
```