#how to set datastore entry data using roblox cloud api

1 messages · Page 1 of 1 (latest)

ember mason
#

Hey im trying to make a python programm that accesses the datastore but i cant figure out how to use Set Entry, can someone help?

#

(Suphi if u read this i beg you to make a tutorial on this 🙏 )

dense oar
#

its on my todo

ember mason
dense oar
#
local HttpService = game:GetService("HttpService")

local universeId = 123456789
local apiKey = 123456789
local playerUserId = 123456789

local url = `https://apis.roblox.com/datastores/v1/universes/{universeId}/standard-datastores/datastore/entries/entry?datastoreName=Players&entryKey={playerUserId}`
local header = {x-api-key = apiKey}

local response = HttpService:GetAsync(url, true, header)
local data = HttpService:JSONDecode(response)
print(data)
#

i have not tested this but it might work

ember mason
#

o yeah btw would GetAsync or SetAsync error while there there is a open session for an entry with your datastore module?

#

because right now im trying to work on a discord bot which is written in python that is able to update datastore entries

dense oar
ember mason
#

ah awesome