數據儲存入口的資源路徑。
格式:
- 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}.
*此內容是使用 AI(Beta 測試版)翻譯,可能含有錯誤。若要以英文檢視此頁面,請按一下這裡。
數據儲存中的鑰匙值入口。
數據儲存入口的資源路徑。
格式:
資料儲存入口創建時的時戳。. 此字串的格式為 Timestamp。
數據儲存入口的修訂ID。
當資料儲存入口以任何方式變更時,都會提交新版本。
格式是任意字串。例如:「foo」.
修訂創建時的時戳。. 此字串的格式為 Timestamp。
數據儲存入口狀態。
可能的值:
| 值 | 說明 | | --- | --- | | 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 的值設為 256。.
從以前的呼叫中收到的頁面代幣,用於取回後續頁面。
當頁面分頁時,所有其他參數提供給後續呼叫的頁面代幣必須與提供頁面代幣的呼叫匹配。.
此欄位可設為過濾返回的資源。
田支持非常小的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 欄位被填滿。兩個 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".
數據儲存入口的修訂列表。
數據儲存入口的修改。.
您發送到下一頁作為 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"
}