From 75d131ba1860dc75486819ca93310292244ef92e Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Thu, 29 Oct 2020 15:55:30 +0400 Subject: [PATCH] Add documentation and update CHANGELOG --- CHANGELOG.md | 1 + docs/API/admin_api.md | 58 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index afeaa930b..5b52acfb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Mix task option for force-unfollowing relays - Media preview proxy (requires `ffmpeg` and `ImageMagick` to be installed and media proxy to be enabled; see `:media_preview_proxy` config for more details). - Pleroma API: Importing the mutes users from CSV files. +- Pleroma API: An endpoint to manage frontends - Experimental websocket-based federation between Pleroma instances. ### Changed diff --git a/docs/API/admin_api.md b/docs/API/admin_api.md index 7bf13daef..ca8c98728 100644 --- a/docs/API/admin_api.md +++ b/docs/API/admin_api.md @@ -1497,3 +1497,61 @@ Returns the content of the document "url": "https://example.com/instance/panel.html" } ``` + +## `GET /api/pleroma/admin/frontends + +### List available frontends + +- Response: + +```json +[ + { + "build_url": "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build", + "git": "https://git.pleroma.social/pleroma/fedi-fe", + "installed": true, + "name": "fedi-fe", + "ref": "master" + }, + { + "build_url": "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build", + "git": "https://git.pleroma.social/lambadalambda/kenoma", + "installed": false, + "name": "kenoma", + "ref": "master" + } +] +``` + + +## `POST /api/pleroma/admin/frontends + +### Install a frontend + +- Params: + - `name`: frontend name, required + - `ref`: frontend ref + - `file`: path to a frontend zip file + - `build_url`: build URL + - `build_dir`: build directory + +- Response: + +```json +[ + { + "build_url": "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build", + "git": "https://git.pleroma.social/pleroma/fedi-fe", + "installed": true, + "name": "fedi-fe", + "ref": "master" + }, + { + "build_url": "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build", + "git": "https://git.pleroma.social/lambadalambda/kenoma", + "installed": false, + "name": "kenoma", + "ref": "master" + } +] +``` -- 2.45.2