数据存储入口的资源路径。
格式:
- universes/{universe_id}/data-stores/{data_store_id}/entries/{data_store_entry_id}
- universes/{universe_id}/data-stores/{data_store_id}/scopes/{data_store_scope_id}/entries/{data_store_entry_id}.
*此内容使用人工智能(Beta)翻译,可能包含错误。若要查看英文页面,请点按 此处。
数据存储中的键值入口。
数据存储入口的资源路径。
格式:
数据存储入口创建时的时戳。. 此字符串格式为 FieldMask。
数据存储入口的版本 ID。
每当数据存储入口以任何方式更改时,都会提交新的修订。
格式是任意字符串。例如:“foo”.
当版本创建时的时戳。. 此字符串格式为 FieldMask。
数据存储入口的状态。
可能的值:
| 值 | 描述 | | --- | --- | | STATE_UNSPECIFIED | 默认值。如果状态被忽略,将使用此值。| | 激活 | 新创建的数据存储入口的默认状态。| | 删除 | 数据存储入口被标记为已删除。在未来的某个时刻,它将永久删除。|. 可能的值:
此校验由服务器根据其他字段的值计算,可以在更新和删除请求(可能还会在某些自定义方法上)上发送,以确保客户端在继续前拥有最新的值。.
入口的值。.
JSON 值可以是 “null”、“boolean”、“string”、“number”、“array” 或 “object”。
入口的资源 ID。
这与资源路径的最后一部分匹配,仅供便利。.
与入口相关的用户。.
与入口相关的任意一组属性。.
https://apis.roblox.com
{
"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"
}
返回数据存储库的一列输入。
只有 path 和 id 字段被填充;使用 GetDataStoreEntry 来检索其他字段。
指定通配符范围(-)以列出所有范围的条目。
宇宙ID。.
数据存储ID。.
返回的数据存储入口最大数量。服务可能返回小于此值。如果未指定,最多返回 10 个数据存储入口。最大值为 256,更高值设置为 256。.
从前一次调用收到的页面代币,用于检索后续页面。
当页面分页时,所有其他参数提供给后续调用的必须与提供页面代币的调用匹配。.
该字段可以设置以便筛选返回的资源。
filter 字段支持一个非常小的子集 Cel:
示例过滤器:id.startsWith("foo").
如果真实,标记为待删除的资源将包含在结果中。.
父集合中数据存储入口列表的列表。
从指定的数据存储或数据存储范围中的数据存储入口。.
您可以将其作为pageToken参数发送的代币来检索下一页。如果该字段被忽略,就没有后续页面。.
curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/data-stores/{data_store_id}/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"
}
创建一个具有提供的 ID 和值的入口。
如果入口存在,返回 400 错误请求。
宇宙ID。.
数据存储ID。.
用于数据存储入口的ID,将成为数据存储入口资源路径的最终组成部分。
这个值应该是 1-50 个字符的字符串。我们强烈建议只使用小写字母、数字和撇号。.
curl -L -X POST 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/data-stores/{data_store_id}/entries?id=my-entry' \
-H 'x-api-key: {your-api-key}' \
-H 'Content-Type: application/json' \
--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"
}
获取指定的输入。
要在特定版本获取入口,请在路径末尾添加 @<revisionId> 。
例如,要在版本 ID my-entry 获取 08DC3D3F43F9FCC1.0000000001.08DC3D3F43F9FCC1.01,请使用路径 /v2/universes/1234/data-stores/5678/entries/my-entry@08DC3D3F43F9FCC1.0000000001.08DC3D3F43F9FCC1.01 。
如果您的入口 ID 包含一个或多个 @ 字符,且您想获得最新版本而不是特定版本,请在路径末尾添加特殊版本 ID @latest 。否则,最后 @ 之后的入口ID段将被解释为版本ID。
例如,要获取最新版本的 my-entry,使用路径 /v2/universes/1234/data-stores/5678/entries/my@entry@latest。
要获取特定时间的入口,请在路径末尾添加 @latest:<timestamp> ,其中 <timestamp> 是按照 RFC-3339 格式化的。给定的时戳必须在 Unix 时代(1/1/1970)之后,且不超过十分钟的未来。
例如,要获取 12/2/2024 在 06:00 UTC 当前的版本 my-entry 的路径,请使用路径 /v2/universes/1234/data-stores/5678/entries/my-entry@latest:2024-12-02T06:00:00Z 。
宇宙ID。.
数据存储ID。.
入口ID。.
curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/data-stores/{data_store_id}/entries/{entry_id}' \
-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"
}
标记指定的输入以进行删除。
输入不会立即删除;相反,state字段将设置为DELETED。永久删除发生在 30 天后。
成功时返回 200 好的。如果入口不存在,返回 404 未找到。
宇宙ID。.
数据存储ID。.
入口ID。.
curl -L -X DELETE 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/data-stores/{data_store_id}/entries/{entry_id}' \
-H 'x-api-key: {your-api-key}'
更新入口的值、属性和用户。
更新入口的特定修订不支持 不支持 。如果在路径中指定一个版本 ID,并且 allow_missing 是 true ,那么更新请求将创建一个新的条目,其中包含 @<revisionId> 后缀作为键的一部分。
部分更新是 不支持 。如果在更新值时没有提供属性或用户,它们将被清除。值必须在更新入口时始终提供。
宇宙ID。.
数据存储ID。.
入口ID。.
如果设置为真,且数据存储库入口未找到,将创建数据存储库入口。.
curl -L -X PATCH 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/data-stores/{data_store_id}/entries/{entry_id}?allowMissing={boolean}' \
-H 'x-api-key: {your-api-key}' \
-H 'Content-Type: application/json' \
--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"
}
增加指定入口的值。既有值和增量金额都必须是整数。
如果入口不存在,创建一个具有指定值的入口。
增加入口的特定修订不支持 不支持 。如果在路径中指定一个版本 ID,增量请求将创建一个新的条目,其中包含 @<revisionId> suffix 作为键的一部分。
已知问题:值可能超过有效范围的值。当这发生时,返回的值将被卡住到有效范围内,但后端可能仍然保留原始值。这种行为是为了兼容性原因而保留的,但可能在此 API 的未来版本中发生变化。
宇宙ID。.
数据存储ID。.
入口ID。.
增加入口值的数量。既有值和增量值都必须是整数。.
与入口相关的用户。
如果未提供,现有用户 ID 将被清除。.
与入口相关的任意一组属性。
如果未提供,现有属性将被清除。.
curl -L -X POST 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/data-stores/{data_store_id}/entries/{entry_id}:increment' \
-H 'x-api-key: {your-api-key}' \
-H 'Content-Type: application/json' \
--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"
}
列出数据存储库条目的修订。
该方法返回部分数据存储入口。
特别是,只有 path , id , createTime , revisionCreateTime , revisionId , etag 和 state 字段被填充。 both the path 和 id 字段都会有一个 @<version> 后缀。
为了在版本中获得完整输入,您可以使用提供的 path 字段与 GetDataStoreEntry 方法,即 GET /v1/universes/1234/data-stores/5678/entries/my-entry@<version> 。
宇宙ID。.
数据存储ID。.
入口ID。.
每页返回的最大修订数量。
服务可能返回少于最大修订数量。如果未指定,最多返回 10 次修订。最大值为 100 值,更高值设置为 100 值。.
从前一次调用收到的页面代币,用于检索后续页面。
当页面分页时,所有其他参数提供给后续调用的必须与提供页面代币的调用匹配。.
支持以下子集的 CEL:
例如:
"revision_create_time >= 2000-01-01T00:00:00Z && revision_create_time <= 2001-01-01T00:00:00Z".
数据存储库条目的修订列表。
数据_store_entry的修订。.
你发送作为 pageToken 参数的代币来检索下一页的代币。如果该字段被忽略,就没有后续页面。.
curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/data-stores/{data_store_id}/entries/{entry_id}: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"
}