Frontends API (Discussion)
- Only one version per FE could be installed at the same time
- The backend must re-fetch manifests in the background and update the FE records if necessary
Frontend Schema
Attribute | Description |
---|---|
name |
Package name (used as ID) |
description |
Description |
url |
Webpage URL |
git |
Git repository URL |
latest_version |
The latest version of the package |
manifest_url |
An URL to the manifest |
releases_url |
An URL to the list of releases |
default |
Is default FE? |
installed_version |
The installed version of the package |
licenses |
A list of licenses that the frontend is licensed under. It is recommended to use SPDX License identifier. |
admin_comment |
A comment by the instance admin |
admin_recommended |
Is recommended by admin? |
Admin Endpoints
Add FE
POST /frontends
- Parameters:
-
manifest_url
: a URL of a FE manifest file. Required.
-
- Returns a Frontend
List Available FEs
GET /frontends
- Returns a list of Frontends
Install / Set as Default
POST /frontends/:fe_name
- Parameters:
-
version
: a version to install/reinstall -
default
: set the FE as the default one (boolean) -
admin_comment
: a comment by the admin
-
- Returns a Frontend
Expects version
or default
or both of them:
- When
version
is set it will try to install or reinstall the specified version. If a release with the version is not found it will return an error. - When
default
is set it will set/unset the FE as the default one. It will return an error if the FE is not installed yet. - When both parameters are set it will install the specified version and set the FE as default.
Delete
DELETE /frontends/:fe_name
- Returns
204 No Content
HTTP code
User Endpoints
List Available FEs
GET /frontends
- Returns a list of Frontends
Select FE
POST /frontends/:fe_name
- Returns a Frontend
Edit (2020-12-23 13:39 UTC): added admin_comment
field