Uploads an image for the specified scene object, replacing any existing image.
A small, thumbnail image will be automatically generated based on the uploaded image. For convenience, the link to this thumbnail is also returned in the image property on the scene object.
Maximum supported size is 5 megabytes. Maximum supported aspect ratio is 5:1. You must specify the Content-Type header as either image/png or image/jpeg.
Images are currently only supported for the object kind: View3d
Request parameters
Scene Id
Object Id
Primary iTwin Id associated with the scene
Request headers
OAuth access token with itwin-platform scope
Setting to application/vnd.bentley.itwin-platform.v1+json is recommended.
Indicates request body content type. Must be image/png or image/jpeg.
Response 200 OK
Link to fetch the uploaded image.
{ "image": { "href": "https://example.net/scene-images/[...]?sv=[...]&sig=[...]" } }
Response 400 Bad Request
Unprocessable Entity
{ "error": { "code": "InvalidScenesRequest", "message": "Cannot update image.", "target": "image", "details": [{ "code": "InvalidRequestBody", "message": "The width or height dimensions of the image cannot be greater than 5 times the size of each other." }] } }
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 5MiB." } }
Response 415 Unsupported Media Type
Unsupported Media Type
{ "error": { "code": "UnsupportedMediaType", "message": "Media Type is not supported." } }
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.
Link
{ "type": "object", "required": [ "href" ], "properties": { "href": { "type": "string", "example": "https://example.com/" } }, "additionalProperties": false }
Error
Contains error information.
One of a server-defined set of error codes.
The target of the error.
A human-readable representation of the error.
{ "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "One of a server-defined set of error codes." }, "target": { "type": "string", "nullable": true, "description": "The target of the error." }, "message": { "type": "string", "description": "A human-readable representation of the error." } }, "description": "Contains error information.", "additionalProperties": true }
image-binary
The binary image file
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", "required": [ "error" ], "properties": { "error": { "$ref": "#/components/schemas/Error", "description": "Error information." } }, "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.", "additionalProperties": false }
ImageResponse
{ "type": "object", "required": [ "image" ], "properties": { "image": { "allOf": [ { "$ref": "#/components/schemas/Link" } ], "description": "The URL of the image" } }, "additionalProperties": false }
Was this page helpful?