API return old data instead of new ones

When you send an API request to get database data for a specific key, you can get the old data instead of the new data that exists in the database.
Example request using @latest revisionId:
https://apis.roblox.com/cloud/v2/universes/4734880740/data-stores/Main/entries/1116383079_data@latest

Response
{
  "path": "universes/4734880740/data-stores/Main/entries/1116383079_data@latest",
  "createTime": "2023-08-08T10:56:36.403362Z",
  "revisionId": "08DB97FE22C75654.00000002EE.08DD308EC7F49D7F.01",
  "revisionCreateTime": "2025-01-09T09:19:55.466483100Z",
  "state": "ACTIVE",
  "etag": "08DB97FE22C75654.00000002EE.08DD308EC7F49D7F.01",
  "value": {
    "nationality": "Украинское",
    "hunger": 77,
    "rewardday": 1,
    "death": 156,
    "license": false,
    "time": 437080,
    "wanted": 37,
    "xp": 30444,
    "licenseNext": 0,
    "Loader": {
      "Грузчик": {
        "last": 1728068148,
        "all": [
          {
            "Rarity": {
              "Chance": 3,
              "Level": "Easy",
              "Color": null
            },
            "Task": {
              "String": "Доставьте на склад №2 10 коробок",
              "Status": "Doing",
              "Id": "Loader.DeliveTo2",
              "Progress": 0,
              "CustomId": "cf005842-2211-4a6a-b86b-29a8a15ce302",
              "Max": 10,
              "Add": []
            },
            "Reward": {
              "Value": 1500,
              "Image": "rbxassetid://14381427897",
              "Type": "Money",
              "String": "1500 РУБЛЕЙ"
            }
          },
          {
            "Rarity": {
              "Chance": 2,
              "Level": "Normal",
              "Color": null
            },
            "Task": {
              "String": "Доставьте на склад №2 30 коробок",
              "Status": "Doing",
              "Id": "Loader.DeliveTo2",
              "Progress": 0,
              "CustomId": "c3e50b40-b66d-4d3f-a515-0a99f8739586",
              "Max": 30,
              "Add": []
            },
            "Reward": {
              "Value": 5000,
              "Image": "rbxassetid://14381427897",
              "Type": "Money",
              "String": "5000 РУБЛЕЙ"
            }
          },
          {
            "Rarity": {
              "Chance": 1,
              "Level": "Hard",
              "Color": null
            },
            "Task": {
              "String": "Доставьте на склад №2 и №3 20 коробок",
              "Status": "Doing",
              "Id": "Loader.DeliveTo23",
              "Progress": 0,
              "CustomId": "fb9fb735-525f-4e02-9498-8a742cbef34d",
              "Max": 40,
              "Add": {
                "2": 0,
                "3": 0
              }
            },
            "Reward": {
              "Value": 7250,
              "Image": "rbxassetid://14381427897",
              "Type": "Money",
              "String": "7250 РУБЛЕЙ"
            }
          }
        ],
        "next": 1728071748
      }
    },
    "money": 313289,
    "level": 16,
    "kills": 1247,
    "givedpass": 1698505351,
    "last": 1736367230,
    "joined": 1698505313
  },
  "id": "1116383079_data",
  "attributes": {}
}

Example request using @ID revisionId:
https://apis.roblox.com/cloud/v2/universes/4734880740/data-stores/Main/entries/1116383079_data@08DB97FE22C75654.00000002F8.08DD32C4B6D28EE5.01

Response
{
  "path": "universes/4734880740/data-stores/Main/entries/1116383079_data@08DB97FE22C75654.00000002F8.08DD32C4B6D28EE5.01",
  "createTime": "2023-08-08T10:56:36.403362Z",
  "revisionId": "08DB97FE22C75654.00000002F8.08DD32C4B6D28EE5.01",
  "revisionCreateTime": "2025-01-12T04:51:01.870973300Z",
  "state": "ACTIVE",
  "etag": "08DB97FE22C75654.00000002F8.08DD32C4B6D28EE5.01",
  "value": {
    "wanted": 38,
    "joined": 1698505313,
    "xp": 32255,
    "money": 5694116,
    "nationality": "Украинское",
    "license": true,
    "time": 441539,
    "licenseNext": 1737237360,
    "kills": 1247,
    "level": 16,
    "Loader": {
      "Грузчик": {
        "last": 1728068148,
        "all": [
          {
            "Rarity": {
              "Chance": 3,
              "Level": "Easy",
              "Color": null
            },
            "Task": {
              "String": "Доставьте на склад №2 10 коробок",
              "Status": "Doing",
              "Id": "Loader.DeliveTo2",
              "Progress": 0,
              "CustomId": "cf005842-2211-4a6a-b86b-29a8a15ce302",
              "Max": 10,
              "Add": []
            },
            "Reward": {
              "Value": 1500,
              "Image": "rbxassetid://14381427897",
              "Type": "Money",
              "String": "1500 РУБЛЕЙ"
            }
          },
          {
            "Rarity": {
              "Chance": 2,
              "Level": "Normal",
              "Color": null
            },
            "Task": {
              "String": "Доставьте на склад №2 30 коробок",
              "Status": "Doing",
              "Id": "Loader.DeliveTo2",
              "Progress": 0,
              "CustomId": "c3e50b40-b66d-4d3f-a515-0a99f8739586",
              "Max": 30,
              "Add": []
            },
            "Reward": {
              "Value": 5000,
              "Image": "rbxassetid://14381427897",
              "Type": "Money",
              "String": "5000 РУБЛЕЙ"
            }
          },
          {
            "Rarity": {
              "Chance": 1,
              "Level": "Hard",
              "Color": null
            },
            "Task": {
              "String": "Доставьте на склад №2 и №3 20 коробок",
              "Status": "Doing",
              "Id": "Loader.DeliveTo23",
              "Progress": 0,
              "CustomId": "fb9fb735-525f-4e02-9498-8a742cbef34d",
              "Max": 40,
              "Add": {
                "2": 0,
                "3": 0
              }
            },
            "Reward": {
              "Value": 7250,
              "Image": "rbxassetid://14381427897",
              "Type": "Money",
              "String": "7250 РУБЛЕЙ"
            }
          }
        ],
        "next": 1728071748
      }
    },
    "givedpass": 1698505351,
    "hunger": 63,
    "death": 156,
    "rewardday": 2,
    "ChristmasEvent2025": {
      "Power": 1,
      "Damage": 45,
      "Candy": 91
    },
    "last": 1736631592
  },
  "id": "1116383079_data",
  "attributes": {}
}

If you pay attention to the value of revisionCreateTime in two cases, you will notice that @latest is returning old data.

Expected behavior

By default, a GET request to entries/entriy and entries/entriy@latest should return a new version of the data, instead of an unknown one.

2 Likes

I’m having the same issue, I tried with the old v1 api and it works fine for some reason.

2 Likes

Yes, you’re right. If you use v1, then there are no such problems. But it’s not entirely convenient to use two endpoints at the same time, as well as switching to the old version of api v1.
I would like this bug to be fixed soon

2 Likes

Hey there, I’ll be taking a look at this.

I tried to reproduce this on my machine and saw that GET entries/entry and entries/entry@latest both returned the latest version.

Could you share a few more details that might help us understand what’s happening?

  1. What was the specific order of operations that led to the output you saw (reads and writes)?
  2. Does this affect GET entries/entry and entries/entry@latest or just the latter?
  3. What is the latest version that appears in ListDataStoreEntryRevisions?
  4. Is the stale data still getting returned?

This did not happen with all keys, but random ones. It was not possible to determine which ones exactly. I have been monitoring this situation and this problem no longer occurs, it may have been a temporary problem.

  1. What was the specific order of operations that led to the output you saw (reads and writes)?
    I and other players entered the server, played, and then left, and I decided to check their data via the API, and in response I received a rather old version of the data (this can be seen from the table keys). Then I decided to figure it out and use :listRevisions and revisionId to check. And :listRevisions returned the correct latest data, but the regular @latest query did not.
  2. Does this affect GET entries/entry and entries/entry@latest or just the latter?
    This affects GET entries/entry and entries/entry@latest
  3. What is the latest version that appears in ListDataStoreEntryRevisions?
    As I mentioned in the first point, :listRevisions returned the correct latest version of the data.
  4. Is the stale data still getting returned?
    At the moment I don’t notice the problem anymore

Thank you for your response!

Hey there, thanks for providing the extra information.

I’ve been unable to reproduce this on my end, and since it seems to have been resolved, I will close this as Can’t Reproduce for now.

However, if you see this bug occurring again, please feel free to reach out!