Table of contents
Scenes API
Download API definition:
This API is a Technical Preview and is available for testing purposes only. Do not use in production.
PATCH https://dev-api.bentley.com/scenes/{sceneId}/objects?iTwinId={iTwinId}

Updates objects in a scene.

Request parameters

Name
Required?
Description
sceneId
Yes

Scene Id

iTwinId
Yes

Primary iTwin Id associated with the scene

Request headers

Name
Required?
Description
x-correlation-id
No

Activity id used for tracking request

Authorization
Yes

OAuth access token with itwin-platform scope

Accept
Yes

Setting to application/vnd.bentley.itwin-platform.v1+json is recommended.

Request body

BulkSceneObjectUpdateDTO

Name
Type
Required?
Description
objects
Yes

Array of scene objects to patch (limit is 20).

Example

json
{
    "objects": [{
        "displayName": "Example Object",
        "order": 1.0,
        "parentId": "d21dd09b-bb38-483a-b34f-5d3d7b3e1bd2",
        "data": {
            "visible": false
        },
        "id": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f"
    }]
}

Response 200 OK

Updated scene objects.

json
{
    "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

json
{
    "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.

json
{
    "error": {
        "code": "HeaderNotFound",
        "message": "Header Authorization was not found in the request. Access denied."
    }
}

Response 403 Forbidden

Forbidden

json
{
    "error": {
        "code": "InsufficientPermissions",
        "message": "The user has insufficient permissions for the requested operation."
    }
}

Response 404 Not Found

Not Found

json
{
    "error": {
        "code": "SceneObjectNotFound",
        "message": "Requested sceneObject is not available.",
        "target": "sceneObject"
    }
}

Response 413 Request Entity Too Large

Payload Too Large

json
{
    "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.

json
{
    "error": {
        "code": "RateLimitExceeded",
        "message": "The client sent more requests than allowed by this API for the current tier of the client."
    }
}

Response headers

Name
Description
retry-after

Number of seconds to wait until client is allowed to make more requests.

SceneObjectDTO

Name
Type
Description
id
Uuid

Unique identifier for the scene object

displayName
String

Optional display name for the scene object

order
Number

Optional number for the scene object order in lists

version
Semver

Maps to the version of the JSON schema this object conforms to

kind
String

Kind of the scene object. Maps to the name of the JSON schema this object conforms to

parentId
Uuid

Optional parent Id for the scene object

relatedId
Uuid

Id of the related scene object referencing the repository resource this styling object applies to. Only allowed (and required) for resource styling objects.

data

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.

sceneId
Uuid

Id of the scene containing the object

createdById
Uuid

Id of the user who created the scene object

creationTime
Date-time

Time the scene object was created as an ISO8601 string, 'YYYY-MM-DDTHH:mm:ss.sssZ'

lastModified
Date-time

Time the scene object was last modified as an ISO8601 string, 'YYYY-MM-DDTHH:mm:ss.sssZ'

SceneObjectUpdateByIdDTO

Name
Type
Description
displayName
String

Display name for the scene object

order
Number

Number for the scene object's order in lists.

parentId
Uuid

Parent Id for the scene object

data

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
Uuid

Id of the the scene object to update

BulkSceneObjectUpdateDTO

Name
Type
Description
objects

Array of scene objects to patch (limit is 20).

SceneObjectListResponse

Name
Type
Description

LayerData

Layers organize scene content and control data visibility. They are not limited to contain specific data types.

Name
Type
Description
visible
Boolean

Whether the layer is turned on or off

Vector3d

Name
Type
Description
x
Number

X coordinate.

y
Number

Y coordinate.

z
Number

Z coordinate.

View3dData

Representation of a 3D view

Name
Type
Description
position
All of: Vector3d

Location of the eye of the camera.

isOrthographic
Boolean

Whether the view is orthographic or perspective

aspectRatio
Number

Aspect ratio of the view

direction
All of: Vector3d

Direction the camera is pointing towards

up
All of: Vector3d

Defines 'up' direction relative to camera in the view

near
Number

Near plane distance

far
Number

Far plane distance

ecefTransform
Number[]

Array of 16 numbers representing a 4x4 matrix in row-major order

Error

Contains error information.

Name
Type
Description
code
String

One of a server-defined set of error codes.

message
String

A human-readable representation of the error.

target
String, null

The target of the error.

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.

Name
Type
Description
error

Error information.

Was this page helpful?