Is there any way of getting globaldatastore entries using opencloud? I have been searching for it for a while and haven’t found any references of it actually being possible.
Yes! You just need the data store name and scope, as well as an API key with permissions for data store reading.
Here’s the base URL:
https://apis.roblox.com/cloud/v2/universes/UNIVERSE_ID/data-stores/DATA_STORE_NAME/entries
Here’s an example using JavaScript’s fetch
to retrieve it:
const apiKey = //key, probably as a secret
const universeId = //your Universe ID
const dataStoreName = "your datastore name here";
async function listEntries() {
let response = await fetch(`https://apis.roblox.com/cloud/v2/universes/${universeId}/data-stores/${dataStoreName}/entries`, {
method: "GET",
headers: {"x-api-key": apiKey}
});
//if it failed
if (!response.ok) {console.warn("FAILED. Code: " + String(response.Status))}
//note that each entry will be in JSON format, you will need to parse it
let data = await response.json();
for (let entry of data) {
let dataInDictionaryFormat = JSON.parse(entry.value)
}
};
Documentation:
DataStoreEntry | Documentation - Roblox Creator Hub