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.
12 Tokens can be attained by visiting "API Tokens" on your profile page.
18 * GET `/api/whoami/` - Json dictionary with the following keys:
19 * `is_authenticated` - True on successful API authentication
20 * `username` - Username of the user authenticated as, null otherwise.
21 * 4xx status codes will be thrown on unsupported authentication type, invalid access token, or other errors.
25 * GET `/api/packages/` - See [Package Queries](#package-queries)
26 * GET `/api/scores/` - See [Package Queries](#package-queries)
27 * GET `/api/packages/<username>/<name>/`
31 * GET `/api/packages/<username>/<name>/releases/`
32 * POST `/api/packages/<username>/<name>/releases/new/`
33 * Requires authentication.
34 * `title`: human-readable name of the release.
35 * `method`: Release-creation method, only `git` is supported.
36 * `min_protocol`: (Optional) minimum Minetest protocol version. See [Minetest](#minetest).
37 * `min_protocol`: (Optional) maximum Minetest protocol version. See [Minetest](#minetest).
38 * If `git` release-creation method:
39 * `ref` - git reference, eg: `master`.
44 * GET `/api/topics/` - Supports [Package Queries](#package-queries), and the following two options:
45 * `show_added` - Show topics which exist as packages, default true.
46 * `show_discarded` - Show topics which have been marked as outdated, default false.
50 * GET `/api/minetest_versions/`
57 /api/packages/?type=mod&type=game&q=mobs+fun&hide=nonfree&hide=gore
59 Supported query parameters:
61 * `type` - Package types (`mod`, `game`, `txp`).
63 * `random` - When present, enable random ordering and ignore `sort`.
64 * `hide` - Hide content based on [Content Flags](content_flags).
65 * `sort` - Sort by (`name`, `views`, `date`, `score`).
66 * `order` - Sort ascending (`Asc`) or descending (`desc`).
67 * `protocol_version` - Only show packages supported by this Minetest protocol version.