Armazenamentos de dados padrão

*Este conteúdo é traduzido por IA (Beta) e pode conter erros. Para ver a página em inglês, clique aqui.

Datastores

https://apis.roblox.com/datastores

Lista de armazenamentos de dados

GET /v1/universes/{universeId}/standard-datastores

Parâmetros

universeId number
Path
Obrigatório
cursor string
limit number
prefix string

Solicitação

curl

curl --include --location --request GET "https://apis.roblox.com/datastores/v1/universes/3310576216/standard-datastores" \
--header "x-api-key: ${API_KEY}" \
--get \
-d "prefix=Player" \
-d "limit=5"

Resposta

200 - OK
Retorna um(a) object
application/json

{
"datastores": [
{
"name": "PlayerInventory",
"createdTime": "2022-02-18T22:38:59.9244932Z"
},
{
"name": "PlayerExperience",
"createdTime": "2022-02-18T23:00:10.4773508Z"
},
{
"name": "PlayerWeapons",
"createdTime": "2022-02-18T23:00:22.3725681Z"
},
{
"name": "PlayerArmor",
"createdTime": "2022-02-18T22:59:33.8472882Z"
},
{
"name": "PlayerHP",
"createdTime": "2022-02-18T22:58:47.6904028Z"
}
],
"nextPageCursor": "..."
}
data array<object>
nextPageCursor string

Permissões necessárias

Entries

https://apis.roblox.com/datastores

Listar Entradas

GET /v1/universes/{universeId}/standard-datastores/datastore/entries

Parâmetros

universeId number
Path
Obrigatório
datastoreName string
scope string
allScopes boolean
prefix string
cursor string
limit number

Solicitação

curl

curl --include --location --request GET "https://apis.roblox.com/datastores/v1/universes/3310576216/standard-datastores/datastore/entries" \
--header "x-api-key: ${API_KEY}" \
--get \
-d "datastoreName=Coins" \
-d "prefix=" \
-d "limit=5"

Resposta

200 - OK
Retorna um(a) object
application/json

{
"keys": [
{
"key": "269323"
}
],
"nextPageCursor": "eyJ2ZXJzaW9uIjoxLCJjdXJzb3IiOiIzIyJ9"
}
keys array<string>
nextPageCursor string

Permissões necessárias

Obter Entrada

GET /v1/universes/{universeId}/standard-datastores/datastore/entries/entry

Parâmetros

universeId number
Path
Obrigatório
datastoreName string
entryKey string
scope string

Solicitação

curl

curl --include --location --request GET "https://apis.roblox.com/datastores/v1/universes/3310576216/standard-datastores/datastore/entries/entry" \
--header "x-api-key: ${API_KEY}" \
--get \
-d "datastoreName=Coins" \
-d "entryKey=269323"

Resposta

200 - OK
Recuperado com sucesso a entrada.
Retorna um(a) object

Permissões necessárias

Definir Entrada

POST /v1/universes/{universeId}/standard-datastores/datastore/entries/entry

Parâmetros

universeId number
Path
Obrigatório
datastoreName string
entryKey string
matchVersion string
exclusiveCreate boolean
scope string
roblox-entry-attributes string
Header
roblox-entry-userids string
Header
content-md5 string
Header

Solicitação

curl

curl --include --location --request POST "https://apis.roblox.com/datastores/v1/universes/3310576216/standard-datastores/datastore/entries/entry?datastoreName=Coins&entryKey=269323" \
--header "x-api-key: ${API_KEY}" \
--header "content-md5: IGPBYI1uC6+AJJxC4r5YBA==" \
--header "content-type: application/json" \
--header "roblox-entry-userids: [269323]" \
--header "roblox-entry-attributes: {}" \
--d "value"

Resposta

200 - OK
Retorna um(a) object
version string
deleted boolean
contentLength number
createdTime string
objectCreatedTime string

Permissões necessárias

Apagar Entrada

DELETE /v1/universes/{universeId}/standard-datastores/datastore/entries/entry

Parâmetros

universeId number
Path
Obrigatório
datastoreName string
entryKey string
scope string

Solicitação

curl

curl --include --location --request DELETE "https://apis.roblox.com/datastores/v1/universes/3310576216/standard-datastores/datastore/entries/entry" \
--header "x-api-key: ${API_KEY}" \
--get \
-d "datastoreName=Coins" \
-d "entryKey=269323"

Resposta

Permissões necessárias

Entrada de Incremento

POST /v1/universes/{universeId}/standard-datastores/datastore/entries/entry/increment

Parâmetros

universeId number
Path
Obrigatório
datastoreName string
entryKey string
incrementBy number
scope string
roblox-entry-attributes string
Header
roblox-entry-userids string
Header

Solicitação

curl

curl --include --location --request POST "https://apis.roblox.com/datastores/v1/universes/3310576216/standard-datastores/datastore/entries/entry/increment" \
--header "x-api-key: ${API_KEY}" \
--header 'content-length: 0' \
--get \
-d "datastoreName=Coins" \
-d "entryKey=269323" \
-d "incrementBy=3"

Resposta

200 - OK
Retorna a versão mais recente da entrada depois que ela foi incrementada.
Retorna um(a) object

Permissões necessárias

Obtenha a versão de entrada

GET /v1/universes/{universeId}/standard-datastores/datastore/entries/entry/versions/version

Parâmetros

universeId number
Path
Obrigatório
datastoreName string
entryKey string
versionId string
scope string

Solicitação

curl

curl --include --location --request GET "https://apis.roblox.com/datastores/v1/universes/3310576216/standard-datastores/datastore/entries/entry/versions/version" \
--header "x-api-key: ${API_KEY}" \
--get \
-d "datastoreName=Coins" \
-d "entryKey=269323" \
-d "versionId=08D9E6A3F2188CFF.0000000003.08D9E6DE485A7680.01"

Resposta

200 - OK
Recuperado com sucesso a entrada.
Retorna um(a) object

Permissões necessárias

Limites

Listar Versões de Entrada

GET /v1/universes/{universeId}/standard-datastores/datastore/entries/entry/versions

Parâmetros

universeId number
Path
Obrigatório
datastoreName string
entryKey string
scope string
cursor string
startTime string
endTime string
sortOrder string
limit number

Solicitação

curl

curl --include --location --request GET "https://apis.roblox.com/datastores/v1/universes/3310576216/standard-datastores/datastore/entries/entry/versions" \
--header "x-api-key: ${API_KEY}" \
--get \
-d "datastoreName=Coins" \
-d "entryKey=269323" \
-d "limit=5"

Resposta

200 - OK
Retorna um(a) object
version string
deleted boolean
contentLength number
createdTime string
objectCreatedTime string

Permissões necessárias

Objetos

DataStore

Atributos

name string
createdTime string

EntryVersion

Atributos

version string
deleted boolean
contentLength number
createdTime string
objectCreatedTime string