aboutsummaryrefslogtreecommitdiff
path: root/docs/api/admin_api.md
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-09-30 13:57:54 +0200
committerlain <lain@soykaf.club>2019-09-30 13:57:54 +0200
commitb923842e96e821afeb7bbfa0d098b9c5698281c5 (patch)
tree37d84255d7b97fc411f5c78378565a8f205a2120 /docs/api/admin_api.md
parent6fe2f554c36be1ef03ac1d1104a78d0686f48a26 (diff)
parent74d8fadf3745a4b4203c2cead35b741554ccc439 (diff)
downloadpleroma-b923842e96e821afeb7bbfa0d098b9c5698281c5.tar.gz
Merge remote-tracking branch 'origin/develop' into reactions
Diffstat (limited to 'docs/api/admin_api.md')
-rw-r--r--docs/api/admin_api.md65
1 files changed, 52 insertions, 13 deletions
diff --git a/docs/api/admin_api.md b/docs/api/admin_api.md
index fd608c459..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:
@@ -317,6 +343,7 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret
```json
{
+ "total" : 1,
"reports": [
{
"account": {
@@ -684,6 +711,7 @@ Compile time settings (need instance reboot):
}
]
}
+```
- Response:
@@ -704,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
@@ -722,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