API for operators
Through the API operators fetch votes, keep profile and listings up to date and report rates and counts of their servers. It speaks JSON; the key goes into the header of the request.
Keys
You create keys under My servers. A key for the account gets the rights you choose. A key for one server only reports its rates and counts, so it may go into the configuration of the game server.
Authorization: Bearer dasa_…
At most 120 calls per key and minute, one report per server every 5 minutes. Times are milliseconds since 1970 (UTC).
Calls
GET /api/v1/operator
Read the operator profile and own serversPUT /api/v1/operatorRightprofile:write
Set the operator profileGET /api/v1/servers
Read own serversPOST /api/v1/serversRightservers:manage
Add or take over a listing, by RCON or with the code in the server nameGET /api/v1/servers/{id}
Read one server, with settings, latest report and state of the proofPATCH /api/v1/servers/{id}Rightprofile:write
Change the profile of the server: display name, languages, website, Discord, descriptionDELETE /api/v1/servers/{id}?reason=gone|unlistRightservers:manage
Delete the listingPOST /api/v1/servers/{id}/releaseRightservers:manage
Give up ownership; the listing staysGET /api/v1/votesRightvotes:read
Votes on own servers; without further parameters only those not claimed yetPOST /api/v1/votes/claimRightvotes:claim
Mark votes as claimedPOST /api/v1/votes/importRightvotes:import
Mirror votes from other server listsPOST /api/v1/reportRightservers:report
Report rates, mods and counts of a server
All fields and answers are described in the OpenAPI file at /api/v1/openapi.json.
Delete
Only someone who took the listing over by proof may delete it, and not during a dispute. The reason must be given:
reason=gone: the server no longer exists. If it runs again, the list adds it anew. As long as the list sees it online, it refuses.reason=unlist: the server should no longer be listed. A block entry keeps it out.
Examples
curl -H "Authorization: Bearer $KEY" "https://deutschearkserver.de/api/v1/votes?claimed=false"
curl -X POST -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d '{"ids":[101,102]}' https://deutschearkserver.de/api/v1/votes/claim
curl -X POST -H "Authorization: Bearer $SERVER_KEY" -H "Content-Type: application/json" -d '{"settings":{"XPMultiplier":3,"TamingSpeedMultiplier":5},"tamed_dinos":4200}' https://deutschearkserver.de/api/v1/report
For existing reward plugins the simple query /api/?object=votes&element=claim&key=… with the key from the server page stays.