diff options
| author | lain <lain@soykaf.club> | 2019-04-08 14:10:51 +0200 | 
|---|---|---|
| committer | lain <lain@soykaf.club> | 2019-04-08 14:10:51 +0200 | 
| commit | a9f805c87100fd2ee1d8426460b81af4a235d574 (patch) | |
| tree | 70179175f0ff84f3f4c7399f63694766aaa65b35 /docs/api | |
| parent | 5d871173d189a0019fda0ee76f8a324d90a163ee (diff) | |
| parent | 4977e96fa408e8148a355b3c759af34ae3ca312d (diff) | |
| download | pleroma-a9f805c87100fd2ee1d8426460b81af4a235d574.tar.gz pleroma-a9f805c87100fd2ee1d8426460b81af4a235d574.zip | |
Merge remote-tracking branch 'origin/develop' into features/mastoapi/2.6.0-conversations
Diffstat (limited to 'docs/api')
| -rw-r--r-- | docs/api/admin_api.md | 20 | ||||
| -rw-r--r-- | docs/api/differences_in_mastoapi_responses.md | 6 | ||||
| -rw-r--r-- | docs/api/pleroma_api.md | 6 | ||||
| -rw-r--r-- | docs/api/prometheus.md | 22 | 
4 files changed, 51 insertions, 3 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/differences_in_mastoapi_responses.md b/docs/api/differences_in_mastoapi_responses.md index d993d1383..215f43155 100644 --- a/docs/api/differences_in_mastoapi_responses.md +++ b/docs/api/differences_in_mastoapi_responses.md @@ -44,3 +44,9 @@ Has these additional fields under the `pleroma` object:  Has these additional fields under the `pleroma` object:  - `is_seen`: true if the notification was read by the user + +## POST `/api/v1/statuses` + +Additional parameters can be added to the JSON body/Form data: + +- `preview`: boolean, if set to `true` the post won't be actually posted, but the status entitiy would still be rendered back. This could be useful for previewing rich text/custom emoji, for example. diff --git a/docs/api/pleroma_api.md b/docs/api/pleroma_api.md index 478c9d874..2e8fb04d2 100644 --- a/docs/api/pleroma_api.md +++ b/docs/api/pleroma_api.md @@ -10,7 +10,7 @@ Request parameters can be passed via [query strings](https://en.wikipedia.org/wi  * Authentication: not required  * Params: none  * Response: JSON -* Example response: `{"kalsarikannit_f":"/finmoji/128px/kalsarikannit_f-128.png","perkele":"/finmoji/128px/perkele-128.png","blobdab":"/emoji/blobdab.png","happiness":"/finmoji/128px/happiness-128.png"}` +* Example response: `[{"kalsarikannit_f":{"tags":["Finmoji"],"image_url":"/finmoji/128px/kalsarikannit_f-128.png"}},{"perkele":{"tags":["Finmoji"],"image_url":"/finmoji/128px/perkele-128.png"}},{"blobdab":{"tags":["SomeTag"],"image_url":"/emoji/blobdab.png"}},"happiness":{"tags":["Finmoji"],"image_url":"/finmoji/128px/happiness-128.png"}}]`  * Note: Same data as Mastodon API’s `/api/v1/custom_emojis` but in a different format  ## `/api/pleroma/follow_import` @@ -27,14 +27,14 @@ Request parameters can be passed via [query strings](https://en.wikipedia.org/wi  * Method: `GET`  * Authentication: not required  * Params: none -* Response: Provider specific JSON, the only guaranteed parameter is `type`  +* Response: Provider specific JSON, the only guaranteed parameter is `type`  * Example response: `{"type": "kocaptcha", "token": "whatever", "url": "https://captcha.kotobank.ch/endpoint"}`  ## `/api/pleroma/delete_account`  ### Delete an account  * Method `POST`  * Authentication: required -* Params:  +* Params:      * `password`: user's password  * Response: JSON. Returns `{"status": "success"}` if the deletion was successful, `{"error": "[error message]"}` otherwise  * Example response: `{"error": "Invalid password."}` 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'] +``` | 
