5 Not all endpoints require authentication.
6 Authentication is done using Bearer tokens:
8 Authorization: Bearer YOURTOKEN
10 You can use the `/api/whoami` to check authentication.
16 * GET `/api/whoami/` - Json dictionary with the following keys:
17 * `is_authenticated` - True on successful API authentication
18 * `username` - Username of the user authenticated as, null otherwise.
19 * 403 will be thrown on unsupported authentication type, invalid access token, or other errors.
23 * GET `/api/packages/` - See [Package Queries](#package-queries)
24 * GET `/api/packages/<username>/<name>/`
28 * GET `/api/packages/<username>/<name>/releases/`
29 * POST `/api/packages/<username>/<name>/releases/new/`
30 * Requires authentication.
31 * `title`: human-readable name of the release.
32 * `method`: Release-creation method, only `git` is supported.
33 * `min_protocol`: (Optional) minimum Minetest protocol version. See [Minetest](#minetest).
34 * `min_protocol`: (Optional) maximum Minetest protocol version. See [Minetest](#minetest).
35 * If `git` release-creation method:
36 * `ref` - git reference, eg: `master`.
41 * GET `/api/topics/` - Supports [Package Queries](#package-queries), and the following two options:
42 * `show_added` - Show topics which exist as packages, default true.
43 * `show_discarded` - Show topics which have been marked as outdated, default false.
47 * GET `/api/minetest_versions/`
54 /api/packages/?type=mod&type=game&q=mobs+fun&hide=nonfree&hide=gore
56 Supported query parameters:
58 * `type` - Package types (`mod`, `game`, `txp`).
60 * `random` - When present, enable random ordering and ignore `sort`.
61 * `hide` - Hide content based on [Content Flags](content_flags).
62 * `sort` - Sort by (`name`, `views`, `date`, `score`).
63 * `order` - Sort ascending (`Asc`) or descending (`desc`).
64 * `protocol_version` - Only show packages supported by this Minetest protocol version.