Cloud APIs
StandardDataStoresApi_V1
incrementStandardDatastoreEntry

incrementStandardDatastoreEntry

Increments the value for an entry by a given amount, or create a new entry with that amount.

Parameters

NameTypeDescription
universeIdIdentifierThe identifier of the experience with data stores that you want to access.
datastoreNamestringThe name of the data store.
entryKeystringThe key identifying the entry.
incrementBynumberThe amount by which the entry should be incremented, or the starting value if it doesn't exist.
scope?stringThe value is global by default.
entryAttributes?Record<string, Identifier>Attributes to be associated with new version of the entry. If not provided, existing attributes are cleared.
entryUserIds?Identifier[]A comma-separated list of Roblox user IDs that the entry is tagged with. If not provided, existing user IDs are cleared.

Example

const { data: incrementedEntry } = await StandardDataStoresApi_V1.incrementStandardDatastoreEntry({
  universeId: 5097539509,
  datastoreName: "LoremIpsum",
  entryKey: "user/45348281",
  incrementBy: 1,
  entryUserIds: [45348281],
}); 

Endpoint

POST /v1/universes/{universeId}/standard-datastores/datastore/entries/entry/increment