ATLauncher API
Base: https://api.atlauncher.com/v2/graphql
ATLauncher offers its pack catalogue through a GraphQL endpoint, so there is a single URL and the content of the request body decides what is returned. The plugin lists packs, searches them, reads one pack and loads its versions this way. Like FeedTheBeast and Technic, ATLauncher packs cannot be installed on the server from the panel, they require the ATLauncher client.
Handler: ATLauncherProvider
POST
/v2/graphql
GraphQL query
Sends a GraphQL query to ATLauncher. The same URL serves pack listing, search, pack details and version lists.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query
|
string | Yes | GraphQL query string (searchPacks or packBySlug) |
variables
|
object | No | GraphQL variables e.g. {"slug":"enigmatica"} or {"search":"tech","first":20} |
Response Example
{"data":{"searchPacks":{"edges":[{"node":{"slug":"enigmatica-6","name":"Enigmatica 6","type":"public","versions":[{"version":"1.5.0","minecraft":"1.16.5"}]}}]}}}
cURL
curl -X POST "https://api.atlauncher.com/v2/graphql" -H "Content-Type: application/json" -d '{"query":"{ searchPacks(search: \"tech\", first: 5) { edges { node { slug name type } } } }"}'
The plugin builds four different queries. The list uses packs(first: N) and the search searchPacks(first: N, query: "..."), both returning id, safeName, name, description and websiteUrl. Details use pack(pack: {id: X}) with name, description, safeName and websiteUrl, the versions use pack(pack: {id: X}) { versions(first: 100) { version } }. The tool name packBySlug mentioned elsewhere is not used by the plugin. A search keyword is placed directly into the query string, so quotation marks in the keyword make the query invalid and give an empty list.
Internal Behavior
The request is a POST to https://api.atlauncher.com/v2/graphql with a JSON body of the form {"query": "..."}. The icon of a pack is built from the safeName: https://cdn.atlcdn.net/images/packs/<safename in lowercase>.png. Up to 100 versions of a pack are loaded. Because the download URL is null and requires_launcher is set, the pack has to be installed with the ATLauncher client and the files uploaded to the server manually. The list has no paging, the total is the number of packs returned.