{"openapi":"3.1.0","info":{"title":"Server list REST interface for operators","version":"1.0.0","description":"Keys are made under \"Meine Server\" and shown once. An operator key acts for its account with the rights chosen for it; a server key only reports settings and counts for one server (POST /report). Send the key as `Authorization: Bearer <key>`. Times are milliseconds since 1970 (UTC). At most 120 calls per key and minute, one report per server every 5 minutes. `error` is a fixed code, `reason` a text for people. The vote API for reward plugins (/api/?object=votes&element=claim&key=…) stays as it is."},"servers":[{"url":"https://deutschearkserver.de/api/v1"}],"security":[{"key":[]}],"components":{"securitySchemes":{"key":{"type":"http","scheme":"bearer","description":"Operator key (dasa_…) with rights out of votes:read, votes:claim, votes:import, profile:write, servers:manage, servers:report, or server key (dasr_…)"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"reason":{"type":"string"}}},"Profile":{"type":"object","properties":{"id":{"type":"integer"},"url":{"type":"string"},"name":{"type":"string","minLength":2,"maxLength":60},"description":{"type":["string","null"]},"rules":{"type":["string","null"]},"discord":{"type":["string","null"],"description":"invite, https://discord.gg/…"},"website":{"type":["string","null"],"description":"https only"},"languages":{"type":["string","null"],"maxLength":64,"description":"free text, e.g. \"Deutsch, English\""}}},"ServerProfile":{"type":"object","description":"Set by the owner; empty fields fall back to the operator profile, languages to the detection from the name","properties":{"display_name":{"type":["string","null"],"minLength":3,"maxLength":100,"description":"shown instead of the measured name, which stays visible"},"languages":{"type":["array","null"],"items":{"enum":["de","en","fr","es","ru"]}},"website":{"type":["string","null"]},"discord":{"type":["string","null"]},"description":{"type":["string","null"],"maxLength":4000}}},"Server":{"type":"object","properties":{"id":{"type":"integer"},"url":{"type":"string"},"game":{"enum":["ase","asa"]},"source":{"type":"string"},"name":{"type":"string","description":"display name of the owner, else the measured name"},"name_in_game":{"type":"string"},"ip":{"type":"string"},"port":{"type":"integer"},"map":{"type":["string","null"]},"cluster_id":{"type":["string","null"]},"online":{"type":"boolean"},"players":{"type":["integer","null"]},"max_players":{"type":["integer","null"]},"mode":{"enum":["pve","pvp",null]},"platforms":{"type":"array","items":{"enum":["pc","xbox","ps"]}},"languages":{"type":"array","items":{"type":"string"}},"votes_month":{"type":"integer"},"cluster_votes_month":{"type":"integer"},"rating":{"type":"object","properties":{"count":{"type":"integer"},"average":{"type":["number","null"]}}},"blocked":{"type":"boolean"},"declared":{"type":"boolean","description":"entered by RCON: name, map, slots, mode, platforms and cluster are statements of the owner"},"ownership":{"type":["object","null"],"properties":{"method":{"type":"string"},"claimed_at":{"type":"integer"},"verified_at":{"type":"integer"},"dispute_until":{"type":["integer","null"]}}},"profile":{"$ref":"#/components/schemas/ServerProfile"}}},"Claim":{"type":"object","properties":{"id":{"type":"integer"},"method":{"enum":["rcon","code"]},"status":{"enum":["pending","confirmed","failed","expired"]},"code":{"type":["string","null"]},"created_at":{"type":"integer"},"expires_at":{"type":["integer","null"]}}},"Vote":{"type":"object","properties":{"id":{"type":"integer"},"server_id":{"type":"integer"},"ts":{"type":"integer"},"player_name":{"type":"string"},"steam_id":{"type":["string","null"]},"eos_id":{"type":["string","null"]},"source":{"type":["string","null"],"description":"null: cast here; else the list a mirrored vote came from (already claimed)"},"claimed_at":{"type":["integer","null"]}}}}},"paths":{"/operator":{"get":{"summary":"Your operator profile and your servers","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"oneOf":[{"$ref":"#/components/schemas/Profile"},{"type":"null"}]},"servers":{"type":"array","items":{"$ref":"#/components/schemas/Server"}}}}}}},"401":{"description":"Missing or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the right, or it is not your server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"Set the operator profile (right profile:write); missing fields are cleared","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"$ref":"#/components/schemas/Profile"}}}}}},"400":{"description":"Invalid profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the right, or it is not your server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/servers":{"get":{"summary":"Your servers","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"servers":{"type":"array","items":{"$ref":"#/components/schemas/Server"}}}}}}},"401":{"description":"Missing or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the right, or it is not your server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Add an entry or take one over (right servers:manage), with the proofs of the server page","description":"By server_id, or by game, ip and the game port. An ASA server that no feed lists is entered with rcon_port, password and the declared fields and belongs to you at once. An ASE server on PC is looked up at Steam. A listed entry is taken over by RCON (method \"rcon\", where the login can be tied to the entry) or by a code in the server name (method \"code\", answer 202 with the code; the list checks every few minutes).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"server_id":{"type":"integer"},"game":{"enum":["ase","asa"]},"ip":{"type":"string"},"port":{"type":"integer"},"method":{"enum":["rcon","code"]},"rcon_port":{"type":"integer"},"password":{"type":"string","description":"used for one login, stored only with store_password"},"store_password":{"type":"boolean"},"name":{"type":"string"},"map":{"type":"string"},"max_players":{"type":"integer"},"mode":{"enum":["pve","pvp"]},"platforms":{"type":"array","items":{"enum":["pc","xbox","ps"]}},"cluster_id":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"enum":["owned","dispute"]},"server":{"$ref":"#/components/schemas/Server"},"message":{"type":"string"}}}}}},"201":{"description":"Entry added","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"enum":["owned","pending","dispute"]},"server":{"$ref":"#/components/schemas/Server"}}}}}},"202":{"description":"Put the code into the server name","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"const":"pending"},"server":{"$ref":"#/components/schemas/Server"},"claim":{"$ref":"#/components/schemas/Claim"},"message":{"type":"string"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the right, or it is not your server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"RCON cannot be tied to this entry; use the code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Proof failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/servers/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"get":{"summary":"One of your servers with settings and report, or a server you are taking over with the state of the proof","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"server":{"$ref":"#/components/schemas/Server"},"claim":{"oneOf":[{"$ref":"#/components/schemas/Claim"},{"type":"null"}]},"settings":{"type":["object","null"]},"report":{"type":["object","null"]}}}}}},"401":{"description":"Missing or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the right, or it is not your server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change the profile of the server (right profile:write); for an RCON entry also its declared fields","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ServerProfile"},{"type":"object","properties":{"name":{"type":"string"},"map":{"type":["string","null"]},"max_players":{"type":["integer","null"]},"mode":{"enum":["pve","pvp",null]},"platforms":{"type":"array"},"cluster_id":{"type":["string","null"]}}}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"server":{"$ref":"#/components/schemas/Server"}}}}}},"400":{"description":"Invalid profile, or measured fields of a measured server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the right, or it is not your server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete the entry (right servers:manage); only after a takeover by proof and without an open dispute","parameters":[{"name":"reason","in":"query","required":true,"schema":{"enum":["gone","unlist"]},"description":"gone: the server is no more (no block; refused while a measured server is online). unlist: keep it out of the list (opt-out)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"integer"},"reason":{"type":"string"}}}}}},"400":{"description":"reason missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the right, or it is not your server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Dispute open, or still online","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/servers/{id}/release":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"post":{"summary":"Give up the ownership; the entry stays (right servers:manage)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"released":{"type":"integer"}}}}}},"401":{"description":"Missing or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the right, or it is not your server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/votes":{"get":{"summary":"Votes on your servers, oldest first (right votes:read)","parameters":[{"name":"server","in":"query","schema":{"type":"integer"}},{"name":"discord_id","in":"query","schema":{"type":"string"},"description":"only the votes of this Discord account; the answers never carry Discord IDs"},{"name":"claimed","in":"query","schema":{"enum":["false","true","all"],"default":"false"}},{"name":"since","in":"query","schema":{"type":"integer"},"description":"ms; raw votes are kept for the current and the two previous calendar months"},{"name":"cursor","in":"query","schema":{"type":"integer"},"description":"next_cursor of the page before"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000,"default":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"votes":{"type":"array","items":{"$ref":"#/components/schemas/Vote"}},"next_cursor":{"type":["integer","null"]}}}}}},"401":{"description":"Missing or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the right, or it is not your server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/votes/claim":{"post":{"summary":"Mark votes as claimed after rewarding them (right votes:claim); repeating does no harm","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ids"],"properties":{"ids":{"type":"array","items":{"type":"integer"},"maxItems":1000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"status":{"enum":["claimed","already","unknown"]}}}},"claimed":{"type":"integer"}}}}}},"401":{"description":"Missing or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the right, or it is not your server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/votes/import":{"post":{"summary":"Mirror votes from another list with the voters' consent (right votes:import)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string"},"votes":{"type":"array"},"withdraw":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array"},"withdrawn":{"type":"integer"}}}}}},"400":{"description":"Invalid import","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the right, or it is not your server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/report":{"post":{"summary":"Report settings and counts of a server, from your own tool or the operator mod","description":"With a server key the key names the server; with an operator key (right servers:report) send server_id. settings uses the keys of GameUserSettings.ini and Game.ini (XPMultiplier, TamingSpeedMultiplier, BabyMatureSpeedMultiplier, …) with the limits of a config upload; unknown keys are ignored and named. Reported settings join the stated settings of the server and go into its history. The list keeps measuring the players itself.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"server_id":{"type":"integer"},"settings":{"type":"object","additionalProperties":{"type":["number","boolean"]}},"mods":{"type":"array","items":{"type":"string"},"maxItems":300},"tamed_dinos":{"type":"integer"},"structures":{"type":"integer"},"players":{"type":"integer"},"version":{"type":"string","maxLength":32},"map":{"type":"string","maxLength":40}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"server_id":{"type":"integer"},"settings":{"type":"integer"},"mods":{"type":["integer","null"]},"counts":{"type":"integer"},"ignored":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"Invalid report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the right, or it is not your server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}