Instance

Represents a data model instance.

特性

pathstring

The resource path of the instance.

Format: universes/{universe_id}/places/{place_id}/instances/{instance_id}.

hasChildrenboolean
僅限輸出

whether the instance has any children instance.

engineInstanceobject

the property details of the instance.

基本網址

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

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

Instance

Get Instance
Beta

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

Gets an instance and its property data.

The maximum supported response data size is 500,000 bytes. If this limit is exceeded, the returned Operation will be completed with an error result that has an error code of 422.

範圍
universe.place.instance:read
請求路徑參數
universe_idstring
需要

The universe ID.

place_idstring
需要

The place ID.

instance_idstring
需要

The instance 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

Update Instance
Beta

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

Updates an instance's property data.

When updating a Script instance's source property, the maximum supported property size is 200,000 bytes after UTF-8 encoding.

範圍
universe.place.instance:write
請求路徑參數
universe_idstring
需要

The universe ID.

place_idstring
需要

The place ID.

instance_idstring
需要

The instance ID.

查詢參數
updateMaskstring

The list of fields to update. 此字串的格式為 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

List Instance Children
Beta

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

Lists an instance's children.

The maximum supported response data size is 500,000 bytes. If this limit is exceeded, the returned Operation will be completed with an error result that has an error code of 422.

範圍
universe.place.instance:read
請求路徑參數
universe_idstring
需要

The universe ID.

place_idstring
需要

The place ID.

instance_idstring
需要

The instance ID.

查詢參數
maxPageSizenumber

The maximum number of child instance to return. The service may return fewer than this value. If unspecified, at most 200 children will be returned. The maximum value is 200; values above 200 will be coerced to 200.

pageTokenstring

A page token, received from a previous ListInstanceChildrenRequest call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListInstanceChildrenRequest must match the call that provided the page token.

回應

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

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

回應

Returns a list of the instance's children.

instancesarray<Instance>

A list of children instances.

.

nextPageTokenstring

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

中繼資料

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