summaryrefslogtreecommitdiff
path: root/docs/api/admin_api.md
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2019-09-30 17:41:20 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2019-09-30 17:41:20 +0300
commit6ffa2b5f661c2db424334c6fb5de6f4d1bfeb745 (patch)
treedd1b2129f3eb7df7b0141cc65ba6c492a36863d0 /docs/api/admin_api.md
parentc98e761d28812818971d327800f1fc4c2baa2dbc (diff)
parenta22a7437d84065192601f73da73d2c27111c9b15 (diff)
downloadpleroma-6ffa2b5f661c2db424334c6fb5de6f4d1bfeb745.tar.gz
pleroma-6ffa2b5f661c2db424334c6fb5de6f4d1bfeb745.zip
[#1260] Merge remote-tracking branch 'remotes/upstream/develop' into 1260-rate-limited-auth-actions
# Conflicts: # CHANGELOG.md
Diffstat (limited to 'docs/api/admin_api.md')
-rw-r--r--docs/api/admin_api.md64
1 files changed, 51 insertions, 13 deletions
diff --git a/docs/api/admin_api.md b/docs/api/admin_api.md
index 9362e3d78..ee9e68cb1 100644
--- a/docs/api/admin_api.md
+++ b/docs/api/admin_api.md
@@ -224,15 +224,25 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret
## `/api/pleroma/admin/users/invite_token`
-### Get an account registration invite token
+### Create an account registration invite token
-- Methods: `GET`
+- Methods: `POST`
- Params:
- - *optional* `invite` => [
- - *optional* `max_use` (integer)
- - *optional* `expires_at` (date string e.g. "2019-04-07")
- ]
-- Response: invite token (base64 string)
+ - *optional* `max_use` (integer)
+ - *optional* `expires_at` (date string e.g. "2019-04-07")
+- Response:
+
+```json
+{
+ "id": integer,
+ "token": string,
+ "used": boolean,
+ "expires_at": date,
+ "uses": integer,
+ "max_use": integer,
+ "invite_type": string (possible values: `one_time`, `reusable`, `date_limited`, `reusable_date_limited`)
+}
+```
## `/api/pleroma/admin/users/invites`
@@ -298,16 +308,32 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret
- Methods: `GET`
- Params: none
-- Response: password reset token (base64 string)
+- Response:
+
+```json
+{
+ "token": "base64 reset token",
+ "link": "https://pleroma.social/api/pleroma/password_reset/url-encoded-base64-token"
+}
+```
+
+
+## `/api/pleroma/admin/users/:nickname/force_password_reset`
+
+### Force passord reset for a user with a given nickname
+
+- Methods: `PATCH`
+- Params: none
+- Response: none (code `204`)
## `/api/pleroma/admin/reports`
### Get a list of reports
- Method `GET`
- Params:
- - `state`: optional, the state of reports. Valid values are `open`, `closed` and `resolved`
- - `limit`: optional, the number of records to retrieve
- - `since_id`: optional, returns results that are more recent than the specified id
- - `max_id`: optional, returns results that are older than the specified id
+ - *optional* `state`: **string** the state of reports. Valid values are `open`, `closed` and `resolved`
+ - *optional* `limit`: **integer** the number of records to retrieve
+ - *optional* `page`: **integer** page number
+ - *optional* `page_size`: **integer** number of log entries per page (default is `50`)
- Response:
- On failure: 403 Forbidden error `{"error": "error_msg"}` when requested by anonymous or non-admin
- On success: JSON, returns a list of reports, where:
@@ -685,6 +711,7 @@ Compile time settings (need instance reboot):
}
]
}
+```
- Response:
@@ -705,7 +732,11 @@ Compile time settings (need instance reboot):
- Method `GET`
- Params:
- *optional* `page`: **integer** page number
- - *optional* `page_size`: **integer** number of users per page (default is `50`)
+ - *optional* `page_size`: **integer** number of log entries per page (default is `50`)
+ - *optional* `start_date`: **datetime (ISO 8601)** filter logs by creation date, start from `start_date`. Accepts datetime in ISO 8601 format (YYYY-MM-DDThh:mm:ss), e.g. `2005-08-09T18:31:42`
+ - *optional* `end_date`: **datetime (ISO 8601)** filter logs by creation date, end by from `end_date`. Accepts datetime in ISO 8601 format (YYYY-MM-DDThh:mm:ss), e.g. 2005-08-09T18:31:42
+ - *optional* `user_id`: **integer** filter logs by actor's id
+ - *optional* `search`: **string** search logs by the log message
- Response:
```json
@@ -723,3 +754,10 @@ Compile time settings (need instance reboot):
}
]
```
+
+## `POST /api/pleroma/admin/reload_emoji`
+### Reload the instance's custom emoji
+* Method `POST`
+* Authentication: required
+* Params: None
+* Response: JSON, "ok" and 200 status