Updates multiple objects within a scene using an ordered list of atomic operations (limit is 100).
All operations are executed in the order provided. If any operation fails, all changes are rolled back.
Supported Operation Types
- add: Create a new scene object.
- Objects will be validated based on user permissions and supported object types. See Scene Object Schemas Documentation for a full list of available object schemas.
- update: Perform a partial update on an existing scene object.
- All properties are optional. The request payload should only contain the properties that you would like to update.
- remove: Delete the specified scene object.
- If the object is a parent, any child objects will be unlinked. If the object kind is RepositoryResource, any associated styling objects will also be deleted.
Request parameters
Scene Id
Primary iTwin Id associated with the scene
Request headers
Activity id used for tracking request
OAuth access token with itwin-platform scope
Setting to application/vnd.bentley.itwin-platform.v1+json is recommended.
Request body
BulkSceneObjectUpdateDTO (Operations)
Example
{ "operations": [{ "op": "add", "payload": { "id": "d21dd09b-bb38-483a-b34f-5d3d7b3e1bd2", "displayName": "Example Object", "kind": "Layer", "version": "1.0.0", "data": { "visible": false } } }, { "op": "update", "id": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f", "payload": { "parentId": "d21dd09b-bb38-483a-b34f-5d3d7b3e1bd2" } }, { "op": "remove", "id": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f" } ] }
Response 200 OK
Updated scene objects.
{ "objects": [{ "id": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f", "sceneId": "eda9e67f-24a3-4bd5-aeca-981d2abdb610", "displayName": "Example Object", "kind": "Layer", "version": "1.0.0", "data": { "visible": false }, "createdById": "37f457a6-25fd-4d4a-8947-974b690158be", "creationTime": "2025-05-04T04:14:08Z", "lastModified": "2025-05-07T01:15:25Z" }] }
Response 400 Bad Request
Unprocessable Entity
{ "error": { "code": "InvalidScenesRequest", "message": "Cannot update sceneObject.", "target": "sceneObject", "details": [{ "code": "InvalidRequestBody", "message": "ParentId must be a UUID.", "target": "operations.0.payload.parentId" }] } }
Response 401 Unauthorized
This response indicates that request lacks valid authentication credentials. Access token might not been provided, issued by the wrong issuer, does not have required scopes or request headers were malformed.
{ "error": { "code": "HeaderNotFound", "message": "Header Authorization was not found in the request. Access denied." } }
Response 403 Forbidden
Forbidden
{ "error": { "code": "InsufficientPermissions", "message": "The user has insufficient permissions for the requested operation." } }
Response 404 Not Found
Not Found
{ "error": { "code": "SceneNotFound", "message": "Requested scene is not available.", "target": "scene" } }
Response 409 Conflict
Conflict
{ "error": { "code": "SceneObjectExists", "message": "SceneObject with operations.0.id already exists." } }
Response 413 Request Entity Too Large
Payload Too Large
{ "error": { "code": "RequestTooLarge", "message": "Request body is greater than the max size of 4.5MiB." } }
Response 429 Too many requests
This response indicates that the client sent more requests than allowed by this API for the current tier of the client.
{ "error": { "code": "RateLimitExceeded", "message": "The client sent more requests than allowed by this API for the current tier of the client." } }
Response headers
Number of seconds to wait until client is allowed to make more requests.
SceneObjectCreateDTO
Optional identifier for the scene object (must be globally unique)
Optional display name for the scene object
Optional number for the scene object order in lists
Optional initial visibility state for the scene object
Maps to the version of the JSON schema this object conforms to
Kind of the scene object. Maps to the name of the JSON schema this object conforms to
Optional parent Id for the scene object
Id of the related scene object referencing the repository resource this styling object applies to. Only allowed (and required) for resource styling objects.
Data for the scene object. The structure of this object must conform to the JSON schema specified by the 'kind' and 'version' fields. Common types include Layer and View3d, but other types are supported. See the Schemas documentation for the full list of available schemas and examples.
{ "required": [ "version", "kind", "data" ], "type": "object", "properties": { "id": { "type": "string", "description": "Optional identifier for the scene object (must be globally unique)", "format": "UUID", "example": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f" }, "displayName": { "type": "string", "description": "Optional display name for the scene object", "example": "Example Object" }, "order": { "type": "number", "description": "Optional number for the scene object order in lists", "example": 1 }, "visible": { "type": "boolean", "description": "Optional initial visibility state for the scene object", "example": true }, "version": { "type": "string", "description": "Maps to the version of the JSON schema this object conforms to", "format": "SemVer", "example": "1.0.0" }, "kind": { "type": "string", "description": "Kind of the scene object. Maps to the name of the JSON schema this object conforms to", "example": "Layer" }, "parentId": { "type": "string", "description": "Optional parent Id for the scene object", "format": "UUID", "example": "d21dd09b-bb38-483a-b34f-5d3d7b3e1bd2" }, "relatedId": { "type": "string", "description": "Id of the related scene object referencing the repository resource this styling object applies to. Only allowed (and required) for [resource styling objects](https://github.com/iTwin/scenes-client/tree/main/docs/schemas/resourceStyling).", "format": "UUID", "example": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f" }, "data": { "oneOf": [ { "$ref": "#/components/schemas/LayerData" }, { "$ref": "#/components/schemas/View3dData" } ], "description": "Data for the scene object. The structure of this object must conform to the JSON schema specified by the 'kind' and 'version' fields. Common types include Layer and View3d, but other types are supported. See the [Schemas documentation](https://github.com/iTwin/scenes-client/tree/main/docs) for the full list of available schemas and examples.", "example": { "visible": false } } }, "additionalProperties": false }
SceneObjectDTO
Globally unique identifier for the scene object
Optional display name for the scene object
Optional number for the scene object order in lists
Optional initial visibility state for the scene object
Maps to the version of the JSON schema this object conforms to
Kind of the scene object. Maps to the name of the JSON schema this object conforms to
Optional parent Id for the scene object
Id of the related scene object referencing the repository resource this styling object applies to. Only allowed (and required) for resource styling objects.
Data for the scene object that conforms to the JSON schema specified by the 'kind' and 'version' fields. Common types include Layer and View3d, but other types are supported. See the Schemas documentation for the full list of available schemas and examples. ⚠️ Important: Treat all strings in this field as potentially untrusted input and always escape or sanitize before rendering.
Id of the scene containing the object
Id of the user who created the scene object
Time the scene object was created as an ISO8601 string, 'YYYY-MM-DDTHH:mm:ss.sssZ'
Time the scene object was last modified as an ISO8601 string, 'YYYY-MM-DDTHH:mm:ss.sssZ'
{ "required": [ "id", "version", "kind", "data", "sceneId", "createdById", "creationTime", "lastModified" ], "type": "object", "properties": { "id": { "type": "string", "description": "Globally unique identifier for the scene object", "format": "UUID", "example": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f" }, "displayName": { "type": "string", "description": "Optional display name for the scene object", "example": "Example Object" }, "order": { "type": "number", "description": "Optional number for the scene object order in lists", "example": 1 }, "visible": { "type": "boolean", "description": "Optional initial visibility state for the scene object", "example": true }, "version": { "type": "string", "description": "Maps to the version of the JSON schema this object conforms to", "format": "SemVer", "example": "1.0.0" }, "kind": { "type": "string", "description": "Kind of the scene object. Maps to the name of the JSON schema this object conforms to", "example": "Layer" }, "parentId": { "type": "string", "description": "Optional parent Id for the scene object", "format": "UUID", "example": "d21dd09b-bb38-483a-b34f-5d3d7b3e1bd2" }, "relatedId": { "type": "string", "description": "Id of the related scene object referencing the repository resource this styling object applies to. Only allowed (and required) for [resource styling objects](https://github.com/iTwin/scenes-client/tree/main/docs/schemas/resourceStyling).", "format": "UUID", "example": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f" }, "data": { "oneOf": [ { "$ref": "#/components/schemas/LayerData" }, { "$ref": "#/components/schemas/View3dData" } ], "description": "Data for the scene object that conforms to the JSON schema specified by the 'kind' and 'version' fields. Common types include Layer and View3d, but other types are supported. See the [Schemas documentation](https://github.com/iTwin/scenes-client/tree/main/docs) for the full list of available schemas and examples. ⚠️ Important: Treat all strings in this field as potentially untrusted input and always escape or sanitize before rendering.", "example": { "visible": false } }, "sceneId": { "type": "string", "description": "Id of the scene containing the object", "format": "UUID", "example": "eda9e67f-24a3-4bd5-aeca-981d2abdb610" }, "createdById": { "type": "string", "description": "Id of the user who created the scene object", "format": "UUID", "example": "37f457a6-25fd-4d4a-8947-974b690158be" }, "creationTime": { "type": "string", "description": "Time the scene object was created as an ISO8601 string, 'YYYY-MM-DDTHH:mm:ss.sssZ'", "format": "date-time", "example": "2025-05-04T04:14:08Z" }, "lastModified": { "type": "string", "description": "Time the scene object was last modified as an ISO8601 string, 'YYYY-MM-DDTHH:mm:ss.sssZ'", "format": "date-time", "example": "2025-05-07T01:15:25Z" } }, "additionalProperties": false }
BulkSceneObjectUpdateDTO
{ "required": [ "operations" ], "type": "object", "properties": { "operations": { "maxItems": 100, "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/CreateSceneObjectOperationDTO" }, { "$ref": "#/components/schemas/UpdateSceneObjectOperationDTO" }, { "$ref": "#/components/schemas/DeleteSceneObjectOperationDTO" } ] }, "description": "Array of add/update/remove object operations to perform (limit is 100)." } }, "additionalProperties": false }
SceneObjectListResponse
{ "required": [ "objects" ], "type": "object", "properties": { "objects": { "type": "array", "items": { "$ref": "#/components/schemas/SceneObjectDTO" } } }, "additionalProperties": false }
SceneObjectUpdateDTO
Display name for the scene object
Number for the scene object's order in lists.
Initial visibility state for the scene object
Parent Id for the scene object
Data for the scene object. The structure of this object must conform to the JSON schema specified by the 'kind' and 'version' fields. Common types include Layer and View3d, but other types are supported. See the Schemas documentation for the full list of available schemas and examples.
{ "type": "object", "properties": { "displayName": { "type": "string", "description": "Display name for the scene object", "example": "Example Object" }, "order": { "type": "number", "description": "Number for the scene object's order in lists.", "example": 1 }, "visible": { "type": "boolean", "description": "Initial visibility state for the scene object", "example": true }, "parentId": { "type": "string", "description": "Parent Id for the scene object", "format": "UUID", "example": "d21dd09b-bb38-483a-b34f-5d3d7b3e1bd2" }, "data": { "oneOf": [ { "$ref": "#/components/schemas/LayerData" }, { "$ref": "#/components/schemas/View3dData" } ], "description": "Data for the scene object. The structure of this object must conform to the JSON schema specified by the 'kind' and 'version' fields. Common types include Layer and View3d, but other types are supported. See the [Schemas documentation](https://github.com/iTwin/scenes-client/tree/main/docs) for the full list of available schemas and examples.", "example": { "visible": false } } }, "additionalProperties": false }
LayerData
Layers organize scene content. They are not limited to contain specific data types.
Whether the layer is turned on or off. DEPRECATED: Use visible field in object metadata instead.
{ "type": "object", "properties": { "visible": { "type": "boolean", "description": "Whether the layer is turned on or off. DEPRECATED: Use visible field in object metadata instead.", "example": true } }, "additionalProperties": false, "description": "Layers organize scene content. They are not limited to contain specific data types." }
Vector3d
X coordinate.
Y coordinate.
Z coordinate.
{ "required": [ "x", "y", "z" ], "type": "object", "properties": { "x": { "type": "number", "description": "X coordinate." }, "y": { "type": "number", "description": "Y coordinate." }, "z": { "type": "number", "description": "Z coordinate." } }, "additionalProperties": false }
View3dData
Representation of a 3D view
Whether the view is orthographic or perspective
Aspect ratio of the view
Near plane distance
Far plane distance
Angle of the field of view in radians for perspective views
Width of the frustum in meters for orthographic views
Array of 16 numbers representing a 4x4 matrix in row-major order
{ "required": [ "position", "isOrthographic", "aspectRatio", "direction", "up", "near", "far", "ecefTransform" ], "type": "object", "properties": { "position": { "allOf": [ { "$ref": "#/components/schemas/Vector3d" } ], "description": "Location of the eye of the camera." }, "isOrthographic": { "type": "boolean", "description": "Whether the view is orthographic or perspective" }, "aspectRatio": { "type": "number", "description": "Aspect ratio of the view" }, "direction": { "allOf": [ { "$ref": "#/components/schemas/Vector3d" } ], "description": "Direction the camera is pointing towards" }, "up": { "allOf": [ { "$ref": "#/components/schemas/Vector3d" } ], "description": "Defines 'up' direction relative to camera in the view" }, "near": { "type": "number", "description": "Near plane distance" }, "far": { "type": "number", "description": "Far plane distance" }, "fov": { "type": "number", "description": "Angle of the field of view in radians for perspective views" }, "width": { "type": "number", "description": "Width of the frustum in meters for orthographic views" }, "ecefTransform": { "maxItems": 16, "minItems": 16, "type": "array", "items": { "type": "number" }, "description": "Array of 16 numbers representing a 4x4 matrix in row-major order" } }, "additionalProperties": false, "description": "Representation of a 3D view" }
CreateSceneObjectOperationDTO
The operation to perform. Allowed values: add.
{ "required": [ "op", "payload" ], "type": "object", "properties": { "op": { "type": "string", "description": "The operation to perform. Allowed values: add.", "example": "add" }, "payload": { "allOf": [ { "$ref": "#/components/schemas/SceneObjectCreateDTO" } ], "description": "Payload for creating the object" } }, "additionalProperties": false }
UpdateSceneObjectOperationDTO
The operation to perform. Allowed values: update.
Id of the the scene object to update
{ "required": [ "op", "id", "payload" ], "type": "object", "properties": { "op": { "type": "string", "description": "The operation to perform. Allowed values: update.", "example": "update" }, "id": { "type": "string", "description": "Id of the the scene object to update", "format": "UUID", "example": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f" }, "payload": { "allOf": [ { "$ref": "#/components/schemas/SceneObjectUpdateDTO" } ], "description": "Payload for updating the object" } }, "additionalProperties": false }
DeleteSceneObjectOperationDTO
The operation to perform. Allowed values: remove.
Id of the the scene object to delete
{ "required": [ "op", "id" ], "type": "object", "properties": { "op": { "type": "string", "description": "The operation to perform. Allowed values: remove.", "example": "remove" }, "id": { "type": "string", "description": "Id of the the scene object to delete", "format": "UUID", "example": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f" } }, "additionalProperties": false }
Error
Contains error information.
One of a server-defined set of error codes.
A human-readable representation of the error.
The target of the error.
{ "type": "object", "description": "Contains error information.", "properties": { "code": { "type": "string", "description": "One of a server-defined set of error codes." }, "message": { "type": "string", "description": "A human-readable representation of the error." }, "target": { "type": "string", "description": "The target of the error.", "nullable": true } }, "required": [ "code", "message" ], "additionalProperties": true }
Error Response
Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.
{ "type": "object", "title": "Error Response", "description": "Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.", "properties": { "error": { "description": "Error information.", "$ref": "#/components/schemas/Error" } }, "required": [ "error" ], "additionalProperties": false }
Was this page helpful?