Data Stores v2 Open Cloud APIs are Now in public Beta

Hi Creators,

We’re excited to share the Beta release of a new and improved version (v2) of the Data Stores Open Cloud APIs. With this new version, we’ve implemented stylistic changes to increase consistency with the rest of Open Cloud endpoints. We’ve also added various quality of life changes (with your feedback – thanks!) which should make working with the Data Stores via Open Cloud a breeze.

Data Stores v2

With the Data Stores v2 endpoints, we’ve made some changes with the goal of bringing them in line with our current API design guidelines and moving Open Cloud towards more overall consistency. With two exceptions (see section below), there are no changes to functionality.

You can view the documentation for the Data Stores v2 endpoints under the Open Cloud API Reference here.

Note: please consider these endpoints as the official method of accessing Data Stores outside of Roblox Studio/experiences. (We’ll soon sunset support for historical unofficial access of Data Stores via hitting undocumented Roblox APIs, i.e. gamepersistence)

Functional changes

The only functional changes being made in Data Stores v2 are:

  1. Numeric values are now doubles and clamped to the range [2^53, -2^53].
  2. Increment operations now have a default increment amount of 1 (previously, the default was 0).

Structural changes

This table describes how certain functionality from datastores/v1 is supported in cloud/v2.

datastores/v1 cloud/v2
SetEntry CreateEntry; UpdateEntry with UpdateDataStoreEntryRequest.allowMissing = true
ListDataStoresRequest.prefix ListDataStoresRequest.filter (example: id.startsWith(“foo”))
ListEntriesRequest.prefix ListDataStoreEntries/ListDataStoreEntryRevisions.filter (example: id.startsWith(“foo”))
ListEntriesRequest.allScopes Collection wildcard (…/scopes/-/…)
SetEntryRequest.matchVersion DataStoreEntry.etag
EntryVersion.deleted DataStoreEntry.state
ListEntryVersionsRequest.minValue, ListEntryVersionsRequest.maxValue ListDataStoreEntryRevisionsRequest.filter (supporting &&, <=, >=)
ListEntryVersionsRequest.sortOrder ListDataStoreEntryRevisionsRequest.orderBy
GetEntryVersion GetEntry with @revisionId appended to the path (example: GET cloud/v2/universes/123/data-stores/456/entries/my-entry@789)

If your entry ID contains the @ symbol, you can use the special revision ID “latest” in order to get the latest version of that entry (preventing part of the ID being interpreted as a revision ID). For example, GET …/entries/foo@bar@latest will get the latest version of the entry with ID foo@bar.

Ordered Data Stores v2

You can view the documentation for the Ordered Data Stores v2 endpoints under the Open Cloud API Reference here.

The changes from ordered-data-stores/v1 are minimal, though useful. Here’s what’s changed:

  1. Ordered Data Stores is now on cloud/v2, rather than a separate endpoint.
  2. Collection names are now kebab-cased rather than camelCased, in part due to your feedback from the release of ordered-data-stores/v1. Thanks! (This means that cloud/v2 uses resource paths like universes/123/ordered-data-stores/some-ordered-data-store/entries, rather than universes/123/orderedDataStores/some-ordered-data-store/entries.)
  3. Values are now doubles rather than int64s, and values will be clamped to the safe integer range for a double: [2^53, -2^53]. This reflects the fact that Luau only supports doubles, and we want to discourage precision bugs resulting from using larger numbers.
  4. Create and update operations without an explicitly provided value are now rejected (previously, they defaulted to value == 0).
  5. Increment operations now have a default increment amount of 1 (previously, the default was 0).
  6. The List operation orderBy argument now is now set using value and value desc (instead of asc and desc). This will allow us to support ordering for other fields and resources in Open Cloud with a standardized syntax.
  7. The documentation of the Increment method has been corrected to reflect existing behavior present in ordered-data-stores/v1: Entry values can be incremented past the valid range, and this may be persisted in the backend, but returned values will be clamped to the valid range.

That’s all, Creators! Our vision for Open Cloud is to give creators a standardized API surface for all of Roblox, and we hope these stylistic changes bring us closer to that goal. Please try out the new-and-improved Data Stores v2 endpoints and let us know what you think. We can’t wait to see what they’ll help you build.

122 Likes

This topic was automatically opened after 10 minutes.

This is a really great update especially for those who makes third-party bots using Discord or such. Although I’m wondering, are the rate limits the same as v1? Thank you!

14 Likes

yes, just, yes
this is a great update

thank you :heart:

12 Likes

Really simple yet effective update! Nice one Roblox

11 Likes

Finally! There won’t be a need to use a separate database anymore, this is great in so many ways, I can already envision the vast possibilities of stuff we can make with this new technology. Kudos to the team!

10 Likes

When will we ever get GetAsync without Roblox credentials? :thinking:

https://devforum.roblox.com/t/roblox-resources-roproxy-dilemma-while-requestinternal-is-used-by-roblox-theyre-adding-cloud-api-which-is-a-roblox-resource/3071661

8 Likes

Hi there Anteater, the limits are the same for now. That said, if you have a use case that requires higher limits, we want to hear about it, as we’re assessing the possibility of increasing the limits. What are you trying to accomplish?

6 Likes

Thanks, Windows! Try them out and let us know what you think!

8 Likes

I have a question, may we please get more advanced features in data stores like built in session-locking in the future? Personally I believe data stores should have these advanced features instead of developers like ourselves having to add them in.

I have no problem with the async functions as I understand it would be hard to make sure they’re less likely to fail, however I feel there should be some added systems to datastores such as session-locking and what not.

11 Likes

I think it would be really awesome if roblox added a datastore dashboard on the game dashboard letting you see the players data in each datastore and the values since i kind of feel like that would be a awesome addition!

for example player[coolkidxx] then it shows the datastore in a table data{} and possibly the save like (datastore1) (datastore2)

13 Likes

Cross Universe Datastores thats an example!

6 Likes

This is awesome! I’ll be using this for Third-Party Components.

6 Likes

I keep getting upstream request timeout errors when using:

  • /v2/universes/{universe}/data-stores/{dataStore}/scopes/${scope}/entries
  • /v2/universes/{universe}/data-stores/{dataStore}/entries

I know this isn’t an issue on my part as sometimes the requests do go through successfully.

5 Likes

Yes that would be neat, although I think we can already do this through listkeysasync?

7 Likes

let them cook
open cloud updates are always welcome :sunglasses:

8 Likes

I have a few questions.

  1. This update should allow external apps to read Roblox datastores, correct?
  2. Can the Datastore’s value be changed outside of Roblox?
  3. If Datastores can be changed outside of Roblox, what’s stopping someone from finding their datastore and editing it’s contents?
6 Likes

An error 401 status code would stop them.

7 Likes

Ooo, was in the beta group and I love it! Nice work team!

6 Likes

uhoh you said the external platform word, now you’re going to be banned… permanently… on another note, this is a great update and I hope to see more updates like this come soon!

7 Likes