DataStore

Represents a data store.

Attributs

pathstring

The resource path of the data store.

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

createTimestring
Sortie seule

The timestamp when the data store was created. Ce string est formatée en tant que Timestamp.

idstring
Sortie seule

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

URL de base

https://apis.roblox.com
La ressource DataStore

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

DataStore

List Data Stores
Bêta

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

Returns a list of data stores.

Périmètres d'application
universe-datastores.control:list
RequêteParamètres du chemin
universe_idstring
Requis

The universe ID.

Paramètres de requête
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").

Réponse

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}'
Réponse

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

DataStore

Snapshot Data Stores
Bêta

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.

Périmètres d'application
universe-datastores.control:snapshot
RequêteParamètres du chemin
universe_idstring
Requis

The universe ID.

Corps de la requête
Réponse

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. Ce string est formatée en tant que 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 '{}'
Réponse

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