Updates an object in a scene.
Request parameters
Scene Id
Object 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
SceneObjectUpdateDTO
Display name for the scene object
Number for the scene object's order in lists.
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 API documentation for the full list of available schemas and examples.
Example
{ "displayName": "Example Object", "order": 1.0, "parentId": "d21dd09b-bb38-483a-b34f-5d3d7b3e1bd2", "data": { "visible": false } }
Response 200 OK
Updated scene object.
{ "object": { "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": "objects.0.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": "SceneObjectNotFound", "message": "Requested sceneObject is not available.", "target": "sceneObject" } }
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.
SceneObjectDTO
Unique identifier for the scene object
Optional display name for the scene object
Optional number for the scene object order in lists
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 API documentation for the full list of available schemas and examples.
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": "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 }, "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 [API documentation](https://github.com/iTwin/scenes-client/tree/main/docs) for the full list of available schemas and examples.", "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 }
SceneObjectResponse
{ "required": [ "object" ], "type": "object", "properties": { "object": { "$ref": "#/components/schemas/SceneObjectDTO" } }, "additionalProperties": false }
SceneObjectUpdateDTO
Display name for the scene object
Number for the scene object's order in lists.
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 API 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 }, "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 [API 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 and control data visibility. They are not limited to contain specific data types.
Whether the layer is turned on or off
{ "required": [ "visible" ], "type": "object", "properties": { "visible": { "type": "boolean", "description": "Whether the layer is turned on or off", "example": true } }, "additionalProperties": false, "description": "Layers organize scene content and control data visibility. 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
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" }, "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" }
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?