aboutsummaryrefslogtreecommitdiff
path: root/docs/api
diff options
context:
space:
mode:
authorlambda <lain@soykaf.club>2019-04-08 09:18:01 +0000
committerlambda <lain@soykaf.club>2019-04-08 09:18:01 +0000
commitb4da2bc1d009ecca0d7821abe3577d1a920c41c0 (patch)
treec75ce1ec6e70724c29efe540a2439de635abc160 /docs/api
parentcfa6e7289f5cfdb1fce17eb89bc0513ff624480d (diff)
parentb177e1e7f330ff1531be190949db7f75e378a449 (diff)
downloadpleroma-b4da2bc1d009ecca0d7821abe3577d1a920c41c0.tar.gz
Merge branch 'develop' into 'improve_upgrade_user_from_ap_id'
# Conflicts: # config/config.exs # docs/config.md
Diffstat (limited to 'docs/api')
-rw-r--r--docs/api/admin_api.md20
-rw-r--r--docs/api/prometheus.md22
2 files changed, 42 insertions, 0 deletions
diff --git a/docs/api/admin_api.md b/docs/api/admin_api.md
index 53b68ffd4..86cacebb1 100644
--- a/docs/api/admin_api.md
+++ b/docs/api/admin_api.md
@@ -58,6 +58,26 @@ Authentication is required and the user must be an admin.
- `password`
- Response: User’s nickname
+## `/api/pleroma/admin/user/follow`
+### Make a user follow another user
+
+- Methods: `POST`
+- Params:
+ - `follower`: The nickname of the follower
+ - `followed`: The nickname of the followed
+- Response:
+ - "ok"
+
+## `/api/pleroma/admin/user/unfollow`
+### Make a user unfollow another user
+
+- Methods: `POST`
+- Params:
+ - `follower`: The nickname of the follower
+ - `followed`: The nickname of the followed
+- Response:
+ - "ok"
+
## `/api/pleroma/admin/users/:nickname/toggle_activation`
### Toggle user activation
diff --git a/docs/api/prometheus.md b/docs/api/prometheus.md
new file mode 100644
index 000000000..19c564e3c
--- /dev/null
+++ b/docs/api/prometheus.md
@@ -0,0 +1,22 @@
+# Prometheus Metrics
+
+Pleroma includes support for exporting metrics via the [prometheus_ex](https://github.com/deadtrickster/prometheus.ex) library.
+
+## `/api/pleroma/app_metrics`
+### Exports Prometheus application metrics
+* Method: `GET`
+* Authentication: not required
+* Params: none
+* Response: JSON
+
+## Grafana
+### Config example
+The following is a config example to use with [Grafana](https://grafana.com)
+
+```
+ - job_name: 'beam'
+ metrics_path: /api/pleroma/app_metrics
+ scheme: https
+ static_configs:
+ - targets: ['pleroma.soykaf.com']
+```