This endpoint will return the details of the specified resource in the repository.
Resource Properties
By default, only minimal properties are returned, which are typically sufficient to display the resource in a list or tree. If you require all properties for a resource, set the Prefer header to return=representation. This will include a properties element in the JSON response that will contain all the resource's properties. The JSON model is determined by the repository, and the properties element will mirror the model you would receive if you queried the repository directly. Use the resource class/subclass to determine how to deserialize and process the properties.
These are the supported property models.
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.
Request parameters
The repository Id
The resource Id
Request headers
OAuth access token with itwin-platform scope
Setting to application/vnd.bentley.itwin-platform.v1+json is recommended.
Indicates a level of details in the response. This operation supports 'return=representation' and 'return=minimal' preferences.
Response 200 OK
OK
{ "resource": { "id": "3954", "class": "Cesium", "type": "IMAGERY", "displayName": "Sentinel-2", "capabilities": { "graphics": { "uri": "https://api.bentley.com/itwins/repositories/cesium/resources/3954/graphics" } } } }
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 repository resource was not found.
{ "error": { "code": "iTwinRepositoryResourceNotFound", "message": "Requested iTwin Repository Resource 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.
Resource
The resource Id. Each repository defines it's own id format. Treat it as a string and do not assume it will be a GUID or integer.
The resource class. This value is copied from the repository.
The resource subclass. This value is copied from the repository and may be empty.
The type of resource as specified by the repository. This is not a fixed list. The values are specific to each respository and not every repository will specify a resource type. In that case, the type property will not be included in the response.
The resource name that can be displayed to the user.
{ "type": "object", "required": [ "id", "displayName" ], "properties": { "id": { "type": "string", "description": "The resource Id. Each repository defines it's own id format. Treat it as a string and do not assume it will be a GUID or integer." }, "class": { "type": "string", "description": "The resource class. This value is copied from the repository." }, "subClass": { "type": "string", "description": "The resource subclass. This value is copied from the repository and may be empty." }, "type": { "type": "string", "description": "The type of resource as specified by the repository. This is not a fixed list. The values are specific to each respository and not every repository will specify a resource type. In that case, the type property will not be included in the response." }, "displayName": { "type": "string", "description": "The resource name that can be displayed to the user." }, "capabilities": { "type": "object", "required": [ "graphics" ], "properties": { "graphics": { "$ref": "#/components/schemas/GraphicsCapability" } }, "additionalProperties": false } }, "additionalProperties": false }
ResourceRepresentation
The resource Id. Each repository defines it's own id format. Treat it as a string and do not assume it will be a GUID or integer.
The resource class. This value is copied from the repository.
The resource subclass. This value is copied from the repository and may be empty.
The type of resource as specified by the repository. This is not a fixed list. The values are specific to each respository and not every repository will specify a resource type. In that case, the type property will not be included in the response.
The resource name that can be displayed to the user.
Additional properties specific to this resource. The structure depends on the resource class.
{ "type": "object", "required": [ "id", "displayName" ], "properties": { "id": { "type": "string", "description": "The resource Id. Each repository defines it's own id format. Treat it as a string and do not assume it will be a GUID or integer." }, "class": { "type": "string", "description": "The resource class. This value is copied from the repository." }, "subClass": { "type": "string", "description": "The resource subclass. This value is copied from the repository and may be empty." }, "type": { "type": "string", "description": "The type of resource as specified by the repository. This is not a fixed list. The values are specific to each respository and not every repository will specify a resource type. In that case, the type property will not be included in the response." }, "displayName": { "type": "string", "description": "The resource name that can be displayed to the user." }, "capabilities": { "type": "object", "required": [ "graphics" ], "properties": { "graphics": { "$ref": "#/components/schemas/GraphicsCapability" } }, "additionalProperties": false }, "properties": { "type": "object", "description": "Additional properties specific to this resource. The structure depends on the resource class.", "additionalProperties": true } }, "additionalProperties": false }
GraphicsCapability
A uri containing the location of the graphics content. This value can be cached but be aware that it might change over time. Some might contain a SAS key that expires after some time.
{ "type": "object", "properties": { "uri": { "type": "string", "description": "A uri containing the location of the graphics content. This value can be cached but be aware that it might change over time. Some might contain a SAS key that expires after some time." } }, "additionalProperties": false }
ResourceResponse
{ "type": "object", "properties": { "resource": { "$ref": "#/components/schemas/Resource" } }, "required": [ "resource" ], "additionalProperties": false }
ResourceRepresentationResponse
{ "type": "object", "properties": { "resource": { "$ref": "#/components/schemas/ResourceRepresentation" } }, "required": [ "resource" ], "additionalProperties": false }
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?