Cloud APIs
EngineApi
updateInstance

updateInstance

Updates an Instance.

Parameters

NameTypeDescription
universeIdUniverseIdThe ID of the universe to get the Instance from.
placeIdPlaceIdThe ID of the place to get the Instance from.
instanceIdInstanceIdThe ID of the Instance to get.
newDataUpdateInstance_NewDataThe new data to apply to the Instance.

Example

const { data: updatedInstance } = await EngineApi.updateInstance({
  universeId: 5795192361,
  placeId: 16866553538,
  instanceId: "4b70b051-16c0-dede-0691-7e9e00004e03",
  newData: {
    script: {
      source: "-- editing a script via typescript :)",
    },
  },
}); 

Example Data

{
  path: "universes/5795192361/places/16866553538/instances/4b70b051-16c0-dede-0691-7e9e00004e03/operations/7a865423-3566-4377-8b9e-ffd831341399",
  done: true,
  response: {
    "@type": "type.googleapis.com/roblox.open_cloud.cloud.v2.Instance",
    path: "universes/5795192361/places/16866553538/instances/4b70b051-16c0-dede-0691-7e9e00004e03",
    hasChildren: false,
    engineInstance: {
      id: "4b70b051-16c0-dede-0691-7e9e00004e03",
      parent: "44b188da-ce63-2b47-02e9-c68d004815fc",
      name: "Script",
      details: {
        script: {
          enabled: true,
          runContext: "Legacy",
          source: "-- editing a script via typescript :)",
        },
      },
    },
  },
} 

Endpoint

PATCH /v2/universes/{universe}/places/{place}/instances/{instance}