Toko Data Standar

*Konten ini diterjemahkan menggunakan AI (Beta) dan mungkin mengandung kesalahan. Untuk melihat halaman ini dalam bahasa Inggris, klik di sini.

Datastores

https://apis.roblox.com/datastores
Endpoint berikut tersedia di jalur relatif terhadap base URL.

Daftar Toko Data

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

Parameter

universeId number
Path
Diperlukan
cursor string
limit number
prefix string

Permintaan

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"

Respons

200 - OK
Memberikan nilai 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

Izin yang Diperlukan

  • List Datastores

Entries

https://apis.roblox.com/datastores
Endpoint berikut tersedia di jalur relatif terhadap base URL.

Daftar Masukan

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

Parameter

universeId number
Path
Diperlukan
datastoreName string
scope string
allScopes boolean
prefix string
cursor string
limit number

Permintaan

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"

Respons

200 - OK
Memberikan nilai object
application/json

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

Izin yang Diperlukan

  • List Entry Keys

Dapatkan Masuk

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

Parameter

universeId number
Path
Diperlukan
datastoreName string
entryKey string
scope string

Permintaan

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"

Respons

200 - OK
Mengembalikan konten pengguna dari entri dalam tubuh respons.
Memberikan nilai object
application/json

{
"content-md5": "zuYxEhwuySMvOi8CitXImw==",
"roblox-entry-version": "08D9E6A3F2188CFF.0000000001.08D9E6A3F2188CFF.01",
"roblox-entry-created-time": "2022-02-02T23:30:06.5388799+00:00",
"roblox-entry-version-created-time": "2022-02-02T23:30:06.5388799+00:00",
"roblox-entry-userids": [ 1, 2, 3 ]
}
roblox-entry-created-time string
last-modified string
roblox-entry-version string
roblox-entry-attributes string
roblox-entry-userids array<number>
content-md5 string

Izin yang Diperlukan

  • Read Entry

Tetapkan Masuk

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

Parameter

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

Permintaan

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"

Respons

200 - OK
Memberikan nilai object
version string
deleted boolean
contentLength number
createdTime string
objectCreatedTime string

Izin yang Diperlukan

  • Create Entry
  • Update Entry

Hapus Masukan

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

Parameter

universeId number
Path
Diperlukan
datastoreName string
entryKey string
scope string

Permintaan

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"

Respons

Izin yang Diperlukan

  • Delete Entry

Meningkatkan Masukan

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

Parameter

universeId number
Path
Diperlukan
datastoreName string
entryKey string
incrementBy number
scope string
roblox-entry-attributes string
Header
roblox-entry-userids string
Header

Permintaan

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"

Respons

200 - OK
Mengembalikan versi terbaru dari entri setelah itu telah ditambahkan.
Memberikan nilai object
application/json

{
"content-md5": "K4phWUsfTE2wkCqKOVztkw==",
"roblox-entry-version": "08D9E6A3F2188CFF.0000000009.08D9E6DF74AC5F42.01",
"roblox-entry-created-time": "2022-02-02T23:30:06.5388799+00:00",
"roblox-entry-version-created-time": "2022-02-03T06:36:05.9184962+00:00",
"roblox-entry-userids": []
}
roblox-entry-created-time string
last-modified string
roblox-entry-version string
roblox-entry-attributes string
roblox-entry-userids array<number>
content-md5 string

Izin yang Diperlukan

  • Create Entry
  • Update Entry

Dapatkan Versi Masuk

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

Parameter

universeId number
Path
Diperlukan
datastoreName string
entryKey string
versionId string
scope string

Permintaan

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"

Respons

200 - OK
Memberikan nilai object
application/json

{
"content-md5": "sTf90fedVsft8zZf6nUg8g==",
"roblox-entry-version": "08D9E6A3F2188CFF.0000000003.08D9E6DE485A7680.01",
"roblox-entry-created-time": "2022-02-02T23:30:06.5388799+00:00",
"roblox-entry-version-created-time": "2022-02-03T06:27:42.0652160+00:00",
"roblox-entry-attributes": {},
"roblox-entry-userids": [ 269323 ]
}
roblox-entry-created-time string
last-modified string
roblox-entry-version string

Izin yang Diperlukan

  • Read Version

Batas

Per Kunci API: 100 permintaan setiap 60 detik per Alamat IP

Daftar Versi Masuk

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

Parameter

universeId number
Path
Diperlukan
datastoreName string
entryKey string
scope string
cursor string
startTime string
endTime string
sortOrder string
limit number

Permintaan

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"

Respons

200 - OK
Memberikan nilai object
version string
deleted boolean
contentLength number
createdTime string
objectCreatedTime string

Izin yang Diperlukan

  • List Versions

Objek

Objek berikut mendeskripsikan muatan yang diterima atau diberikan. Lihat masing-masing endpoint untuk mengetahui informasi selengkapnya tentang waktu penggunaan objek ini.

DataStore

Atribut

name string
createdTime string

EntryVersion

Atribut

version string
deleted boolean
contentLength number
createdTime string
objectCreatedTime string