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

Creates objects in the specified scene.

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.

Request parameters

Name
Required?
Description
sceneId
Yes

Scene Id

iTwinId
Yes

Primary iTwin Id associated with the scene

Request headers

Name
Required?
Description
Authorization
Yes

OAuth access token with itwin-platform scope

Accept
Yes

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

Request body

BulkSceneObjectCreateDTO

Name
Type
Required?
Description
objects
Yes

Array of scene objects to create (limit is 100).

Example

json
{
    "objects": [{
        "id": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f",
        "displayName": "Bridge Design Model",
        "description": "Aerial overview of the bridge construction site.",
        "order": 1,
        "displayOrder": 1,
        "visible": true,
        "version": "1.0.0",
        "kind": "RepositoryResource",
        "parentId": "d21dd09b-bb38-483a-b34f-5d3d7b3e1bd2",
        "relatedId": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f",
        "data": {
            "iTwinId": "1ba4c28a-e518-42d4-85e4-ff9f9ef44bb6",
            "repositoryId": "imodels",
            "id": "97e0ed3a-9bd6-4668-af67-ae4cbe474fc9",
            "class": "iModels"
        }
    }]
}

Response 201 Created

Created scene objects.

json
{
    "objects": [{
        "id": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f",
        "sceneId": "eda9e67f-24a3-4bd5-aeca-981d2abdb610",
        "displayName": "Bridge Design Model",
        "visible": true,
        "kind": "RepositoryResource",
        "version": "1.0.0",
        "data": {
            "iTwinId": "1ba4c28a-e518-42d4-85e4-ff9f9ef44bb6",
            "repositoryId": "imodels",
            "id": "97e0ed3a-9bd6-4668-af67-ae4cbe474fc9",
            "class": "iModels"
        },
        "createdById": "37f457a6-25fd-4d4a-8947-974b690158be",
        "lastModifiedById": "37f457a6-25fd-4d4a-8947-974b690158be",
        "creationTime": "2025-05-04T00:14:08-04:00",
        "lastModified": "2025-05-06T21:15:25-04:00"
    }]
}

Response 400 Bad Request

Unprocessable Entity

json
{
    "error": {
        "code": "InvalidScenesRequest",
        "message": "Cannot create 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 409 Conflict

Conflict

json
{
    "error": {
        "code": "SceneObjectExists",
        "message": "SceneObject with objects.0.id already exists."
    }
}

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.

Link

Name
Type
Description
href
String

Error

Contains error information.

Name
Type
Description
code
String

One of a server-defined set of error codes.

target
String, null

The target of the error.

message
String

A human-readable representation 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.

SceneObjectDTO

Name
Type
Description
id
Uuid

Globally unique identifier for the scene object

data

Data for the scene object that conforms to the JSON schema specified by the 'kind' and 'version' fields. Common types include RepositoryResource and View3d, but other types are supported. See the Schemas documentation for the full list of available schemas and examples.

kind
String

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

image
All of: Link

The URL of the image, if one exists. This is a small, thumbnail image that was created using the Upload scene object image endpoint.

order
Number

Optional number for the scene object's order in lists.

sceneId
Uuid

Id of the scene containing the object

version
Semver

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

visible
Boolean

Optional initial visibility state for the scene object

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.

createdById
Uuid

Id of the user who created the scene object

description
String

Optional detailed description for the scene object

displayName
String

Optional display name for the scene object

creationTime
Date-time

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

displayOrder
Number

Optional stacking order for clients to control rendering sequence. Objects with lower values are typically drawn beneath objects with higher values.

lastModified
Date-time

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

lastModifiedById
Uuid

Id of the user who last modified the scene object

SceneObjectData

Data for a scene object. Either RepositoryResource data or View3d data.

SceneObjectCreateDTO

Name
Type
Description
id
Uuid

Optional identifier for the scene object (must be globally unique)

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 RepositoryResource and View3d, but other types are supported. See the Schemas documentation for the full list of available schemas and examples.

kind
String

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

order
Number

Optional number for the scene object's order in lists.

version
Semver

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

visible
Boolean

Optional initial visibility state for the scene object

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.

description
String

Optional detailed description for the scene object

displayName
String

Optional display name for the scene object

displayOrder
Number

Optional stacking order for clients to control rendering sequence. Objects with lower values are typically drawn beneath objects with higher values.

SceneObjectListResponse

Name
Type
Description

BulkSceneObjectCreateDTO

Name
Type
Description
objects

Array of scene objects to create (limit is 100).

Was this page helpful?