DataStore

Represents a data store.

Atribut

pathstring

The resource path of the data store.

Format: universes/{universe_id}/data-stores/{data_store_id}.

createTimestring
Hanya Output

The timestamp when the data store was created. String ini diformat sebagai Timestamp.

idstring
Hanya Output

The ID of the data store. Matches the last segment of the path.

Base URL

https://apis.roblox.com
Resource DataStore

{
"path": "universes/123/data-stores/some-data-store",
"createTime": "2023-07-05T12:34:56Z",
"id": "string"
}

DataStore

List Data Stores
Beta

GET /cloud/v2/universes/{universe_id}/data-stores

Returns a list of data stores.

Cakupan
universe-datastores.control:list
PermintaanParameter Jalur
universe_idstring
Diperlukan

The universe ID.

Parameter Kueri
maxPageSizenumber

The maximum number of data stores to return. The service might return fewer than this value. If unspecified, at most 10 data stores are returned. The maximum value is 100 and higher values are set to 100.

pageTokenstring

A page token, received from a previous call, to retrieve a subsequent page.

When paginating, all other parameters provided to the subsequent call must match the call that provided the page token.

filterstring

This field may be set in order to filter the resources returned.

The filter field supports a very small subset of CEL:

  • Only the id field is supported.
  • Only the startsWith function is available; no other operators nor built-ins are supported.

Example filter: id.startsWith("foo").

Respons

A list of DataStores in the parent collection.

dataStoresarray<DataStore>

The DataStores from the specified Universe.

nextPageTokenstring

A token that you can send as a pageToken parameter to retrieve the next page. If this field is omitted, there are no subsequent pages.

GET /cloud/v2/universes/{universe_id}/data-stores

curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/data-stores?maxPageSize=10&pageToken={string}&filter={string}' \
-H 'x-api-key: {your-api-key}'
Respons

{
"dataStores": [
{
"path": "universes/123/data-stores/some-data-store",
"createTime": "2023-07-05T12:34:56Z",
"id": "string"
}
],
"nextPageToken": "string"
}

DataStore

Snapshot Data Stores
Beta

POST /cloud/v2/universes/{universe_id}/data-stores:snapshot

Takes a new snapshot of the data stores in an experience.

After a snapshot, the next write to every key in the experience will create a versioned backup of the previous data, regardless of the time of the last write.

In effect, all data current at the time of the snapshot is guaranteed to be available as a versioned backup for at least 30 days.

Snapshots can be taken once per UTC day, per experience. If the latest snapshot was taken within the same UTC day, this operation is a no-op and the time of the latest snapshot will be returned.

For more information on using snapshots, see the Data Stores Engine guide.

Cakupan
universe-datastores.control:snapshot
PermintaanParameter Jalur
universe_idstring
Diperlukan

The universe ID.

Request Body
Respons

Returns whether a new snapshot was taken and the time of the latest snapshot after the operation (regardless of whether a new snapshot was taken).

newSnapshotTakenboolean

Whether a new snapshot was taken by this operation. (Only one snapshot can be taken per experience per UTC day.).

latestSnapshotTimestring

The time of the latest snapshot after the operation (regardless of whether a new snapshot was created). This time is always returned in UTC. String ini diformat sebagai Timestamp.

POST /cloud/v2/universes/{universe_id}/data-stores:snapshot

curl -L -X POST 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/data-stores:snapshot' \
-H 'x-api-key: {your-api-key}' \
-H 'Content-Type: application/json' \
--data '{}'
Respons

{
"newSnapshotTaken": true,
"latestSnapshotTime": "2023-07-05T12:34:56Z"
}