DataStoreEntry

  • 资源路径
  • /cloud/v2/universes/{universe}/data-stores/{data-store}/entries
  • /cloud/v2/universes/{universe}/data-stores/{data-store}/scopes/{scope}/entries

属性

pathstring
createTimestring
仅输出
revisionIdstring
不可改变
仅输出
revisionCreateTimestring
仅输出
stateEnum<string>
仅输出
etagstring
valueJSON value
idstring
仅输出
usersarray<string>
attributesobject
基本网址

https://apis.roblox.com/cloud
DataStoreEntry 资源

{
"path": "universes/123/data-stores/some-data-store/entries/some-data-store-entry",
"createTime": "2023-07-05T12:34:56Z",
"revisionId": "string",
"revisionCreateTime": "2023-07-05T12:34:56Z",
"state": "STATE_UNSPECIFIED",
"etag": "string",
"value": "JSON value",
"id": "string",
"users": [
"string"
],
"attributes": "object"
}

DataStoreEntry

List Data Store Entries
Beta

GET /cloud/v2/universes/{universe}/data-stores/{data-store}/entries
范围
universe-datastores.objects:list
请求路径参数
universestring
必填
data-storestring
必填
查询参数
maxPageSizenumber
pageTokenstring
filterstring
showDeletedboolean
答复
nextPageTokenstring
GET /cloud/v2/universes/{universe}/data-stores/{data-store}/entries

curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe}/data-stores/{data-store}/entries?maxPageSize=10&pageToken={string}&filter={string}&showDeleted={boolean}' \
-H 'x-api-key: {your-api-key}'
答复

{
"dataStoreEntries": [
{
"path": "universes/123/data-stores/some-data-store/entries/some-data-store-entry",
"createTime": "2023-07-05T12:34:56Z",
"revisionId": "string",
"revisionCreateTime": "2023-07-05T12:34:56Z",
"state": "STATE_UNSPECIFIED",
"etag": "string",
"value": "JSON value",
"id": "string",
"users": [
"string"
],
"attributes": "object"
}
],
"nextPageToken": "string"
}

DataStoreEntry

Create Data Store Entry
Beta

POST /cloud/v2/universes/{universe}/data-stores/{data-store}/entries
范围
universe-datastores.objects:create
请求路径参数
universestring
必填
data-storestring
必填
查询参数
idstring
请求正文DataStoreEntry
POST /cloud/v2/universes/{universe}/data-stores/{data-store}/entries

curl -L -X POST 'https://apis.roblox.com/cloud/v2/universes/{universe}/data-stores/{data-store}/entries?id=my-entry' \
-H 'x-api-key: {your-api-key}' \
--data '{ \
"etag": "string", \
"value": "JSON value", \
"users": [ \
"string" \
], \
"attributes": "object" \
}'
答复

{
"path": "universes/123/data-stores/some-data-store/entries/some-data-store-entry",
"createTime": "2023-07-05T12:34:56Z",
"revisionId": "string",
"revisionCreateTime": "2023-07-05T12:34:56Z",
"state": "STATE_UNSPECIFIED",
"etag": "string",
"value": "JSON value",
"id": "string",
"users": [
"string"
],
"attributes": "object"
}

DataStoreEntry

Get Data Store Entry
Beta

GET /cloud/v2/universes/{universe}/data-stores/{data-store}/entries/{entry}
范围
universe-datastores.objects:read
请求路径参数
universestring
必填
data-storestring
必填
entrystring
必填
GET /cloud/v2/universes/{universe}/data-stores/{data-store}/entries/{entry}

curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe}/data-stores/{data-store}/entries/{entry}' \
-H 'x-api-key: {your-api-key}'
答复

{
"path": "universes/123/data-stores/some-data-store/entries/some-data-store-entry",
"createTime": "2023-07-05T12:34:56Z",
"revisionId": "string",
"revisionCreateTime": "2023-07-05T12:34:56Z",
"state": "STATE_UNSPECIFIED",
"etag": "string",
"value": "JSON value",
"id": "string",
"users": [
"string"
],
"attributes": "object"
}

DataStoreEntry

Delete Data Store Entry
Beta

DELETE /cloud/v2/universes/{universe}/data-stores/{data-store}/entries/{entry}
范围
universe-datastores.objects:delete
请求路径参数
universestring
必填
data-storestring
必填
entrystring
必填
DELETE /cloud/v2/universes/{universe}/data-stores/{data-store}/entries/{entry}

curl -L -X DELETE 'https://apis.roblox.com/cloud/v2/universes/{universe}/data-stores/{data-store}/entries/{entry}' \
-H 'x-api-key: {your-api-key}'

DataStoreEntry

Update Data Store Entry
Beta

PATCH /cloud/v2/universes/{universe}/data-stores/{data-store}/entries/{entry}
范围
universe-datastores.objects:update
请求路径参数
universestring
必填
data-storestring
必填
entrystring
必填
查询参数
allowMissingboolean
请求正文DataStoreEntry
PATCH /cloud/v2/universes/{universe}/data-stores/{data-store}/entries/{entry}

curl -L -X PATCH 'https://apis.roblox.com/cloud/v2/universes/{universe}/data-stores/{data-store}/entries/{entry}?allowMissing={boolean}' \
-H 'x-api-key: {your-api-key}' \
--data '{ \
"etag": "string", \
"value": "JSON value", \
"users": [ \
"string" \
], \
"attributes": "object" \
}'
答复

{
"path": "universes/123/data-stores/some-data-store/entries/some-data-store-entry",
"createTime": "2023-07-05T12:34:56Z",
"revisionId": "string",
"revisionCreateTime": "2023-07-05T12:34:56Z",
"state": "STATE_UNSPECIFIED",
"etag": "string",
"value": "JSON value",
"id": "string",
"users": [
"string"
],
"attributes": "object"
}

DataStoreEntry

Increment Data Store Entry
Beta

POST /cloud/v2/universes/{universe}/data-stores/{data-store}/entries/{entry}:increment
范围
universe-datastores.objects:createuniverse-datastores.objects:update
请求路径参数
universestring
必填
data-storestring
必填
entrystring
必填
请求正文
amountnumber
usersarray<string>
attributesobject
POST /cloud/v2/universes/{universe}/data-stores/{data-store}/entries/{entry}:increment

curl -L -X POST 'https://apis.roblox.com/cloud/v2/universes/{universe}/data-stores/{data-store}/entries/{entry}:increment' \
-H 'x-api-key: {your-api-key}' \
--data '{ \
"amount": "number", \
"users": [ \
"string" \
], \
"attributes": "object" \
}'
答复

{
"path": "universes/123/data-stores/some-data-store/entries/some-data-store-entry",
"createTime": "2023-07-05T12:34:56Z",
"revisionId": "string",
"revisionCreateTime": "2023-07-05T12:34:56Z",
"state": "STATE_UNSPECIFIED",
"etag": "string",
"value": "JSON value",
"id": "string",
"users": [
"string"
],
"attributes": "object"
}

DataStoreEntry

List Data Store Entry Revisions
Beta

GET /cloud/v2/universes/{universe}/data-stores/{data-store}/entries/{entry}:listRevisions
范围
universe-datastores.versions:list
请求路径参数
universestring
必填
data-storestring
必填
entrystring
必填
查询参数
maxPageSizenumber
pageTokenstring
filterstring
答复
nextPageTokenstring
GET /cloud/v2/universes/{universe}/data-stores/{data-store}/entries/{entry}:listRevisions

curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe}/data-stores/{data-store}/entries/{entry}:listRevisions?maxPageSize=10&pageToken={string}&filter={string}' \
-H 'x-api-key: {your-api-key}'
答复

{
"dataStoreEntries": [
{
"path": "universes/123/data-stores/some-data-store/entries/some-data-store-entry",
"createTime": "2023-07-05T12:34:56Z",
"revisionId": "string",
"revisionCreateTime": "2023-07-05T12:34:56Z",
"state": "STATE_UNSPECIFIED",
"etag": "string",
"value": "JSON value",
"id": "string",
"users": [
"string"
],
"attributes": "object"
}
],
"nextPageToken": "string"
}