Cloud APIs
StandardDataStoresApi_V2
incrementStandardDatastoreEntry

incrementStandardDatastoreEntry

Increments an entry in a standard datastore.

Parameters

NameTypeDescription
universeIdIdentifierThe ID of the universe to increment an entry in.
dataStorestringthe name of the datastore to increment an entry in.
scope?stringThe optional scope of the dataStore.
entryIdstringThe ID (key / name) of the entry.
value🤷The value (content) of the entry.
users?ArrayNonEmptyIfConstArray metadata containing the IDs of the users this entry is affiliated with.
attributes?Record<any, any>Key-Value Pairs metadata containing arbitrary data.

Example

const { data: entry } = await StandardDataStoresApi_V2.incrementStandardDatastoreEntry({
  universeId: 5097539509,
  dataStore: "Deaths",
  entryId: "users/45348281",
  amount: 3,
  users: [45348281],
}); 

Example Data

{
  path: "universes/5097539509/data-stores/Deaths/entries/users:45348281",
  createTime: 2024-07-22T19:46:42.453Z,
  revisionId: "08DCAA8702D435AC.0000000003.08DCAA877D776995.01",
  revisionCreateTime: 2024-07-22T19:46:42.453Z,
  state: "ACTIVE",
  etag: "08DCAA8702D435AC.0000000003.08DCAA877D776995.01",
  value: 9,
  id: "users:45348281",
  users: ["users/45348281"],
  attributes: {},
} 

Endpoint

POST /v2/universes/{universe}/data-stores/{data-store}/entries/{entryId}:increment
POST /v2/universes/{universe}/data-stores/{data-store}/scopes/{scope}/entries/{entryId}:increment