Plain data stores

For games that call GetAsync, UpdateAsync and RemoveAsync themselves.

On this page

If your game calls GetAsync, UpdateAsync and RemoveAsync itself, report right after each one that worked, with the key info it gave back. In Atomo, leave Data path empty: the save is the data.

Start

Server script
local HttpService = game:GetService("HttpService")
local ServerStorage = game:GetService("ServerStorage")
local Atomo = require(ServerStorage.Atomo)

local found, secret = pcall(function()
    return HttpService:GetSecret("atomo_report")
end)
Atomo.start({
    url = "https://api.useatomo.com",
    key = if found then secret else nil,
})

Load

Luau
local ok, data, info = pcall(function()
    return store:GetAsync(key)
end)
if ok then
    Atomo.report("PlayerData", key, data, info)
end

Report before anything in the table is filled in. A key that has never been saved gives no key info, so nothing is sent: that player’s first save is.

Save

Luau
local ok, saved, info = pcall(function()
    return store:UpdateAsync(key, transform)
end)
if ok then
    Atomo.report("PlayerData", key, saved, info)
end

Report what UpdateAsync gave back, which is what Roblox stored, not the table you passed in.

Remove

Luau
local ok, _, info = pcall(function()
    return store:RemoveAsync(key)
end)
if ok then
    Atomo.removed("PlayerData", key, info)
end

User IDs

Atomo takes each save’s user IDs from its key info, as Roblox keeps them, and the owner from the key itself when the key pattern has {user}. Name the player when you save (UpdateAsync’s transform can give back their user ID): deleting a user’s data and Roblox’s erasure requests then find every save that is theirs.

A save that names its player
local ok, saved, info = pcall(function()
    return store:UpdateAsync(key, function()
        return data, { player.UserId }
    end)
end)