*此內容是使用 AI(Beta 測試版)翻譯,可能含有錯誤。若要以英文檢視此頁面,請按一下這裡

Instance

代表數據模型實例。

特性

pathstring

實例的資源路徑。

格式:universes/{universe_id}/places/{place_id}/instances/{instance_id}.

hasChildrenboolean
僅限輸出

實例是否有任何子實例.

engineInstanceobject

實例的屬性詳情.

基本網址

https://apis.roblox.com
Instance資源

{
"path": "universes/123/places/123/instances/0123456789abcdef0123456789abcdef",
"hasChildren": true,
"engineInstance": {
"Id": "string",
"Parent": "string",
"Name": "string",
"Details": {
"Folder": {}
}
}
}

Instance

取得實例
Beta

GET /cloud/v2/universes/{universe_id}/places/{place_id}/instances/{instance_id}

獲得一個實例和其屬性資料。

最大支持的回應資料大小為 500,000 位元。如果此限制超出,返回的 Operation 將使用具有錯誤代碼 422 的錯誤結果完成。

範圍
universe.place.instance:read
限制
  • API 金鑰: 使用者或群組所有 API 金鑰每分鐘 45 次要求數

注意:在高流量期間,速率限制可能會降低。部分端點有額外的速率限制。深入瞭解速率限制

請求路徑參數
universe_idstring
需要

宇宙ID。.

place_idstring
需要

地點ID。.

instance_idstring
需要

實例 ID。.

回應

此方法不同步且會傳回一個「Operation」,代表該操作的目前狀態。其中包含一個端點路徑,您可以輪詢以獲得實際回應和適用的中繼資料。詳情請參閱關於長期執行操作的說明文件

以下部分描述操作完成時提供的回應和中繼資料物件。

回應Instance中繼資料

GET /cloud/v2/universes/{universe_id}/places/{place_id}/instances/{instance_id}

curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/places/{place_id}/instances/{instance_id}' \
-H 'x-api-key: {your-api-key}'

Instance

更新實例
Beta

PATCH /cloud/v2/universes/{universe_id}/places/{place_id}/instances/{instance_id}

更新實例的屬性資料。

當更新Script實例的源屬性時,最大支持的屬性尺寸是在UTF-8編碼後的200,000字節。

範圍
universe.place.instance:write
限制
  • API 金鑰: 使用者或群組所有 API 金鑰每分鐘 45 次要求數

注意:在高流量期間,速率限制可能會降低。部分端點有額外的速率限制。深入瞭解速率限制

請求路徑參數
universe_idstring
需要

宇宙ID。.

place_idstring
需要

地點ID。.

instance_idstring
需要

實例 ID。.

查詢參數
updateMaskstring

要更新的字段列表。. 此字串的格式為 FieldMask

請求主體Instance
回應

此方法不同步且會傳回一個「Operation」,代表該操作的目前狀態。其中包含一個端點路徑,您可以輪詢以獲得實際回應和適用的中繼資料。詳情請參閱關於長期執行操作的說明文件

以下部分描述操作完成時提供的回應和中繼資料物件。

回應Instance中繼資料

PATCH /cloud/v2/universes/{universe_id}/places/{place_id}/instances/{instance_id}

curl -L -X PATCH 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/places/{place_id}/instances/{instance_id}?updateMask={string}' \
-H 'x-api-key: {your-api-key}' \
-H 'Content-Type: application/json' \
--data '{
"engineInstance": {
"Id": "string",
"Parent": "string",
"Name": "string",
"Details": {
"Folder": {}
}
}
}'

Instance

列出實例子女
Beta

GET /cloud/v2/universes/{universe_id}/places/{place_id}/instances/{instance_id}:listChildren

列出實例的兒子。

最大支持的回應資料大小為 500,000 位元。如果此限制超出,返回的 Operation 將使用具有錯誤代碼 422 的錯誤結果完成。

範圍
universe.place.instance:read
限制
  • API 金鑰: 使用者或群組所有 API 金鑰每分鐘 45 次要求數

注意:在高流量期間,速率限制可能會降低。部分端點有額外的速率限制。深入瞭解速率限制

請求路徑參數
universe_idstring
需要

宇宙ID。.

place_idstring
需要

地點ID。.

instance_idstring
需要

實例 ID。.

查詢參數
maxPageSizenumber

要返回的兒子實例最大數量。服務可能會返回少於此值。如果未指定,最多 200 個子環將被返回。最大值為 200;超過 200 的值將被強制為 200。.

pageTokenstring

來自以前的 ListInstanceChildrenRequest 呼叫的頁面代幣。提供此來恢復後續頁面。

當頁面分頁時,所有其他參數提供給 ListInstanceChildrenRequest 必須與提供頁面代幣的呼叫匹配。.

回應

此方法不同步且會傳回一個「Operation」,代表該操作的目前狀態。其中包含一個端點路徑,您可以輪詢以獲得實際回應和適用的中繼資料。詳情請參閱關於長期執行操作的說明文件

以下部分描述操作完成時提供的回應和中繼資料物件。

回應

返回實例的兒子列表。

instancesarray<Instance>

一個列表子實例。.

nextPageTokenstring

可以發送為 page_token 來恢復下一頁的代幣。如果此欄位被忽略,就沒有後續頁面。.

中繼資料

GET /cloud/v2/universes/{universe_id}/places/{place_id}/instances/{instance_id}:listChildren

curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/places/{place_id}/instances/{instance_id}:listChildren?maxPageSize=100&pageToken={string}' \
-H 'x-api-key: {your-api-key}'