API overview
The address, keys, limits and what every answer holds.
The API reads one game’s players as Atomo keeps them: its data stores, a search, one player’s save, their history and their edits. It changes nothing.
The address
Every request goes to https://api.useatomo.com, over https, with the path under /v1. Answers are JSON.
| Request | Answers |
|---|---|
| GET /v1/stores | The game’s data stores |
| GET /v1/players?q= | The players a search finds, newest save first |
| GET /v1/players/{key} | One player’s save, or one of their earlier saves |
| GET /v1/players/{key}/history | Every save Atomo kept of them |
| GET /v1/players/{key}/edits | The edits made to them, and what became of each |
Keys
Make an API key in the game’s Settings (owners and admins), and send it with every request:
curl https://api.useatomo.com/v1/stores \
-H "Authorization: Bearer $ATOMO_API_KEY"
local HttpService = game:GetService("HttpService")
-- Kept in the experience's secrets as atomo_read, with api.useatomo.com as its domain.
local key = HttpService:GetSecret("atomo_read")
local ok, response = pcall(function()
return HttpService:RequestAsync({
Url = "https://api.useatomo.com/v1/stores",
Method = "GET",
Headers = { Authorization = key:AddPrefix("Bearer ") },
})
end)
if ok and response.Success then
local answer = HttpService:JSONDecode(response.Body)
print(#answer.stores)
end
- A key starts
atomo_read_and is 54 characters long. It is shown once, and Atomo keeps only a hash of it. - A key reads one game, and nothing else. It can’t change anything, or see who in your organisation made an edit.
- Two keys at most for each game, so you can change one without a gap. Removing one works from the next request.
Every answer
asOf: when the answer was made, in milliseconds since 1970, UTC. Every time in the API is like this.- A player’s
receivedAt: when Atomo last received their save. Atomo’s copy is as new as the last save it was told of. Cache-Control: no-store: nothing is kept on the way.
Games with several data stores
With one data store, nothing more is needed. With several, add store, and scope if it isn’t global, to every request about players:
curl "https://api.useatomo.com/v1/players/Player_48213?store=PlayerData&scope=global" \
-H "Authorization: Bearer $ATOMO_API_KEY"
local url = "https://api.useatomo.com/v1/players/Player_48213?store=PlayerData&scope=global"
Limits
1,200 requests a minute for each game, and one request at a time for each organisation: a second while one is running is answered 429 with Retry-After. A search runs for 4 seconds at most. All of it: Errors and limits.
During early access, every organisation has the API. Once plans start, it is part of Pro and Studio: a key of a game whose plan has no API is answered 403 plan, and works again on a plan that has it.