Gets the image metadata for the specified iTwin.
The metadata will contain the name of the image and a URL for downloading the image. The name of the image is unique and will only change if the image changes. It can be used as a long term cache key to determine if you have already downloaded the image. The URLs will be valid for a minimum of 1 hour.
This API is used to get a link to the small image and the original uploaded image. To make it easier to use the small image as a thumbnail, the small image link is also included as a property on every iTwin.
Authentication
Requires Authorization
header with valid Bearer token for scope itwin-platform
.
For more documentation on authorization and how to get access token visit OAUTH2 Authorization page.
Authorization
The calling user must be a member of the specified iTwin. Use the Access Control API to manage an iTwin's members.
Request parameters
iTwin ID associated with the retrieved image.
Request headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v1+json
is recommended.
Response 200 OK
OK
{ "image": { "id": "b3bd3a79-c5b4-41f5-ba5f-6d8c338d788a", "smallImageName": "small_b3bd3a79-c5b4-41f5-ba5f-6d8c338d788a.jpeg", "smallImageUrl": "https://crdeveussa01.blob.core.windows.net/context-thumbnails/small_b3bd3a79-c5b4-41f5-ba5f-6d8c338d788a.jpeg?sv=2018-03-28&sr=b&sig=cuvNWKQE7hCsc4R12LPRSi%2BVOw0EhlB3pHxnrwHK4G8%3D&se=2023-06-28T00%3A00%3A00Z&sp=r", "largeImageName": "large_b3bd3a79-c5b4-41f5-ba5f-6d8c338d788a.jpeg", "largeImageUrl": "https://crdeveussa01.blob.core.windows.net/context-images/large_b3bd3a79-c5b4-41f5-ba5f-6d8c338d788a.jpeg?sv=2018-03-28&sr=b&sig=n%2BP%2BdGc1Uum4WHEm8Ji9ipZm6tM9d1r8b2iQS%2FjuOEM%3D&se=2023-06-28T00%3A00%3A00Z&sp=r" } }
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 404 Not Found
This response indicates that the specified iTwin was not found.
{ "error": { "code": "ImageNotFound", "message": "Requested image is not available." } }
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.
image-response
{ "type": "object", "properties": { "image": { "$ref": "#/components/schemas/image" } }, "required": [ "image" ], "additionalProperties": false }
image
The unique id of the image.
The generated name of the small image. It is unique and will only change if the image changes. The small image is an automatically generated thumbnail of the uploaded image.
The URL of the small image. This URL is also returned as a property on each iTwin. This makes it easy to use as a thumbnail.
The generated name of the uploaded image. It is unique and will only change if the image changes.
The URL of the large image. Usually, only the small image is used but this URL will provide the orginal large image if needed.
{ "type": "object", "properties": { "id": { "type": "string", "description": "The unique id of the image." }, "smallImageName": { "type": "string", "description": "The generated name of the small image. It is unique and will only change if the image changes. The small image is an automatically generated thumbnail of the uploaded image." }, "smallImageUrl": { "type": "string", "description": "The URL of the small image. This URL is also returned as a property on each iTwin. This makes it easy to use as a thumbnail." }, "largeImageName": { "type": "string", "description": "The generated name of the uploaded image. It is unique and will only change if the image changes." }, "largeImageUrl": { "type": "string", "description": "The URL of the large image. Usually, only the small image is used but this URL will provide the orginal large image if needed." } }, "additionalProperties": false, "example": { "image": { "id": "b3bd3a79-c5b4-41f5-ba5f-6d8c338d788a", "smallImageName": "small_b3bd3a79-c5b4-41f5-ba5f-6d8c338d788a.jpeg", "smallImageUrl": "https://crdeveussa01.blob.core.windows.net/context-thumbnails/small_b3bd3a79-c5b4-41f5-ba5f-6d8c338d788a.jpeg?sv=2018-03-28&sr=b&sig=cuvNWKQE7hCsc4R12LPRSi%2BVOw0EhlB3pHxnrwHK4G8%3D&se=2023-06-28T00%3A00%3A00Z&sp=r", "largeImageName": "large_b3bd3a79-c5b4-41f5-ba5f-6d8c338d788a.jpeg", "largeImageUrl": "https://crdeveussa01.blob.core.windows.net/context-images/large_b3bd3a79-c5b4-41f5-ba5f-6d8c338d788a.jpeg?sv=2018-03-28&sr=b&sig=n%2BP%2BdGc1Uum4WHEm8Ji9ipZm6tM9d1r8b2iQS%2FjuOEM%3D&se=2023-06-28T00%3A00%3A00Z&sp=r" } } }
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?