클라우드

DataStore

Represents a data store.

특성

pathstring

The resource path of the data store.

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

createTimestring
출력 전용

The timestamp when the data store was created. 이 문자열은 Timestamp 형식으로 지정됩니다.

idstring
출력 전용

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

기본 URL

https://apis.roblox.com
DataStore 리소스

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

DataStore

List Data Stores
베타

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

Returns a list of data stores.

범위
universe-datastores.control:list
요청경로 매개 변수
universe_idstring
필수

The universe ID.

쿼리 매개 변수
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").

응답

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}'
응답

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

DataStore

Snapshot Data Stores
베타

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.

범위
universe-datastores.control:snapshot
요청경로 매개 변수
universe_idstring
필수

The universe ID.

요청 본문
응답

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. 이 문자열은 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 '{}'
응답

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