Retrieves a list of iModels belonging to the specified iTwin.
Notes
The Prefer
header can be used to specify how much result metadata is desired by the client. The Prefer
request header field is used to indicate that particular server behaviors are preferred by the client but are not required for successful completion of the request.
This operation supports "return=representation"
and "return=minimal"
preferences.
The "return=representation"
preference indicates that the client prefers that the server include an entity representing the current state of the resource in the response to a successful request.
The "return=minimal"
preference indicates that the client wishes the server to return only a minimal response to a successful request. This is the default preference if Prefer
header is not specified.
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
User must have imodels_webview
permission assigned at the iModel level. If iModel Role permissions at the iModel level are configured, then user must additionally have at least imodels_webview
permission assigned at the iTwin level. If permissions at the iModel level are not configured, then user must have imodels_webview
permission assigned at the iTwin level.
Alternatively the user should be an Organization Administrator for the Organization that owns a given iTwin the iModel belongs to.
For more information please refer to Account Administrator documentation section on Access Control API documentation page.
Rate limits
All iTwin Platform API operations have a rate limit. For more documentation on that visit Rate limits and quotas page.
Request parameters
Id of the iTwin.
The $skip query option requests the number of items in the queried collection that are to be skipped and not included in the result. E.g. to return items from the collection starting at the third place provide the following query: $skip=2.
The $top query option requests the number of items in the queried collection to be included in the result. E.g. to return only first collection item provide the following query: $top=1. When $top parameter is not provided default is set to 100. $top value cannot exceed 1000.
The $orderBy query option allows clients to request ascending using 'asc' or descending using 'desc' order of the returned collection by one or more item properties. Currently supported properties for iModels are 'name' and 'createdDateTime'. When neither 'asc' or 'desc' keyword is specified the collection is sorted in ascending order. To sort the collection in descending order provide 'desc' keyword e.g.: $orderBy=name desc,createdDateTime desc
The $search query option allows users to filter iModels whose name or description property contains the search string. E.g. to return iModels whose name or description contains 'Sun City', provide the following query: $search=Sun%20City. This parameter cannot be used at the same time as the name parameter. Valid values for this parameter are non-empty strings that are not longer than 255 characters.
The name query option allows users to filter iModels by their name property. E.g. to return iModels that have a name equal to 'Sun City Renewable-energy Plant' provide the following query: name=Sun%20City%20Renewable-energy%20Plant. Valid values for this parameter follow the same requirements as for iModel creation - strings should be not empty, consist not only of whitespace and not exceed 255 characters. This query option uses exact matching.
The state query option allows users to filter iModels by their state property. To return iModels that are initialized, provide initialized keyword e.g.: state=initialized. Valid values for this parameter are 'initialized' or 'notInitialized'.
Request headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v2+json
is recommended.
Indicates a level of details in the response. This operation supports 'return=representation' and 'return=minimal' preferences.
Response 200 OK
OK
{ "iModels": [{ "id": "758bdcde-567a-43e0-9321-c7897cced698", "displayName": "Sun City Renewable-energy Plant", "dataCenterLocation": "East US" }, { "id": "b44460c9-b61d-422c-9422-d36497c3dd04", "displayName": "Power Town Processing Plant", "dataCenterLocation": "East US" } ], "_links": { "self": { "href": "https://api.bentley.com/imodels?iTwinId=ad0ba809-9241-48ad-9eb0-c8038c1a1d51&$skip=0&$top=100" }, "prev": { "href": "https://api.bentley.com/imodels?iTwinId=ad0ba809-9241-48ad-9eb0-c8038c1a1d51&$skip=0&$top=100" }, "next": { "href": "https://api.bentley.com/imodels?iTwinId=ad0ba809-9241-48ad-9eb0-c8038c1a1d51&$skip=100&$top=100" } } }
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
Specified iTwin was not found.
{ "error": { "code": "iTwinNotFound", "message": "Requested iTwin is not available." } }
Response 422 Unprocessable Entity
The 422 (Unprocessable Entity) status code indicates that the request cannot be processed by the server due to a client error (e.g. malformed request syntax)
{ "error": { "code": "InvalidiModelsRequest", "message": "Cannot get iModels.", "details": [{ "code": "InvalidValue", "message": "'abc' is not a valid 'iTwinId' value.", "target": "iTwinId" }] } }
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.
iModel (summary)
Summarized representation of the iModel.
Id of the iModel
Display name of the iModel. Corresponds to Name property.
The data center where the data for this iModel is persisted. It will be the same as the iTwin data center, unless that data center is not supported or was not supported when the first iTwin iModel was created. All iTwin iModels are in the same region. Default is East US. Possible Values: Australia East, Canada Central, East US, Japan East, North Europe, South Africa North, Southeast Asia, UK South.
{ "type": "object", "title": "iModel (summary)", "description": "Summarized representation of the iModel.", "properties": { "id": { "type": "string", "description": "Id of the iModel" }, "displayName": { "type": "string", "description": "Display name of the iModel. Corresponds to Name property." }, "dataCenterLocation": { "type": "string", "description": "The data center where the data for this iModel is persisted. It will be the same as the iTwin data center, unless that data center is not supported or was not supported when the first iTwin iModel was created. All iTwin iModels are in the same region. Default is East US. Possible Values: Australia East, Canada Central, East US, Japan East, North Europe, South Africa North, Southeast Asia, UK South." } }, "additionalProperties": false }
iModel state
Indicates the state of the iModel. Possible values: 'initialized', 'notInitialized'.
{ "type": "string", "description": "Indicates the state of the iModel. Possible values: 'initialized', 'notInitialized'.", "enum": [ "initialized", "notInitialized" ], "title": "iModel state" }
iModel
Full representation of the iModel.
Id of the iModel
Display name of the iModel. Corresponds to Name property.
The data center where the data for this iModel is persisted. It will be the same as the iTwin data center, unless that data center is not supported or was not supported when the first iTwin iModel was created. All iTwin iModels are in the same region. Default is East US. Possible Values: Australia East, Canada Central, East US, Japan East, North Europe, South Africa North, Southeast Asia, UK South.
Name of the iModel.
Description of the iModel.
Date when the iModel was created.
Id of the iTwin that iModel belongs to.
Indicates if permissions at the iModel level are configured. true
- iModel level permissions are configured. Permissions at iModel level override the iTwin level permissions. false
- iModel permissions are not configured and the iTwin level permissions are applied.
The maximum rectangular area on the Earth which encloses the iModel. The maximum extent is used to help keep your iModel clean. When new elements are imported, those outside the extent will be flagged for further processing. This extent will also help to zoom to the area of interest in web viewers.
Indicates the state of the iModel. Possible values: 'initialized', 'notInitialized'.
Technology Preview property. Reserved for internal use only.
{ "type": "object", "description": "Full representation of the iModel.", "properties": { "id": { "type": "string", "description": "Id of the iModel" }, "displayName": { "type": "string", "description": "Display name of the iModel. Corresponds to Name property." }, "dataCenterLocation": { "type": "string", "description": "The data center where the data for this iModel is persisted. It will be the same as the iTwin data center, unless that data center is not supported or was not supported when the first iTwin iModel was created. All iTwin iModels are in the same region. Default is East US. Possible Values: Australia East, Canada Central, East US, Japan East, North Europe, South Africa North, Southeast Asia, UK South." }, "name": { "type": "string", "description": "Name of the iModel." }, "description": { "type": "string", "description": "Description of the iModel.", "nullable": true }, "createdDateTime": { "type": "string", "format": "date-time", "description": "Date when the iModel was created." }, "iTwinId": { "type": "string", "description": "Id of the iTwin that iModel belongs to." }, "isSecured": { "type": "boolean", "description": "Indicates if permissions at the iModel level are configured. `true` - iModel level permissions are configured. Permissions at iModel level override the iTwin level permissions. `false` - iModel permissions are not configured and the iTwin level permissions are applied." }, "extent": { "$ref": "#/components/schemas/Extent", "description": "The maximum rectangular area on the Earth which encloses the iModel. The maximum extent is used to help keep your iModel clean. When new elements are imported, those outside the extent will be flagged for further processing. This extent will also help to zoom to the area of interest in web viewers." }, "state": { "type": "string", "description": "Indicates the state of the iModel. Possible values: 'initialized', 'notInitialized'.", "enum": [ "initialized", "notInitialized" ], "title": "iModel state", "$ref": "#/components/schemas/iModel-state" }, "containersEnabled": { "type": "integer", "description": "**Technology Preview** property. Reserved for internal use only." }, "_links": { "$ref": "#/components/schemas/iModelLinks", "description": "Contains the hyperlinks to the related data of the iModel." } }, "additionalProperties": false }
iModels (prefer return=minimal)
List of iModels.
{ "type": "object", "title": "iModels (prefer return=minimal)", "description": "List of iModels.", "properties": { "iModels": { "type": "array", "description": "List of iModels.", "items": { "$ref": "#/components/schemas/iModelSummary" } }, "_links": { "$ref": "#/components/schemas/PagingLinks", "description": "Contains the hyperlinks to the previous and next pages of results." } }, "additionalProperties": false }
iModels (prefer return=representation)
List of iModels.
{ "type": "object", "title": "iModels (prefer return=representation)", "description": "List of iModels.", "properties": { "iModels": { "type": "array", "description": "List of iModels.", "items": { "$ref": "#/components/schemas/iModel" } }, "_links": { "$ref": "#/components/schemas/PagingLinks", "description": "Contains the hyperlinks to the previous and next pages of results." } }, "additionalProperties": false }
iModel Links
Hyperlinks to related data which complements this entity.
{ "type": "object", "title": "iModel Links", "description": "Hyperlinks to related data which complements this entity.", "properties": { "creator": { "$ref": "#/components/schemas/Link", "description": "Information about the creator of the entity." }, "changesets": { "$ref": "#/components/schemas/Link", "description": "Link to retrieve Changesets of the iModel." }, "namedVersions": { "$ref": "#/components/schemas/Link", "description": "Link to retrieve Named Versions of the iModel." } }, "additionalProperties": false }
Link
Hyperlink container.
Hyperlink to the specific entity.
{ "type": "object", "nullable": true, "description": "Hyperlink container.", "properties": { "href": { "type": "string", "description": "Hyperlink to the specific entity." } }, "additionalProperties": false }
Extent
A rectangular area on the Earth. A rectangular area is defined by two latitudes and two longitudes that represent the four sides of a rectangular area on the Earth.
{ "type": "object", "nullable": true, "description": "A rectangular area on the Earth. A rectangular area is defined by two latitudes and two longitudes that represent the four sides of a rectangular area on the Earth.", "properties": { "southWest": { "$ref": "#/components/schemas/Point", "description": "South Latitude, West Longitude." }, "northEast": { "$ref": "#/components/schemas/Point", "description": "North Latitude, East Longitude." } }, "required": [ "southWest", "northEast" ], "additionalProperties": false }
Point
A point on the Earth specified by a latitude and longitude.
Latitude. Latitude ranges between -90 and 90 degrees, inclusive.
Longitude. Longitude ranges between -180 and 180 degrees, inclusive.
{ "type": "object", "description": "A point on the Earth specified by a latitude and longitude.", "properties": { "latitude": { "type": "number", "format": "double", "minimum": -90, "maximum": 90, "description": "Latitude. Latitude ranges between -90 and 90 degrees, inclusive." }, "longitude": { "type": "number", "format": "double", "minimum": -180, "maximum": 180, "description": "Longitude. Longitude ranges between -180 and 180 degrees, inclusive." } }, "required": [ "longitude", "latitude" ], "additionalProperties": false }
Paging Links
URLs for redoing the current request, getting to the previous or next page of results, if applicable.
{ "type": "object", "title": "Paging Links", "description": "URLs for redoing the current request, getting to the previous or next page of results, if applicable.", "properties": { "self": { "description": "URL for redoing the current request.", "$ref": "#/components/schemas/Link" }, "prev": { "description": "URL for getting the previous page of results.", "$ref": "#/components/schemas/Link" }, "next": { "description": "URL for getting the next page of results.", "$ref": "#/components/schemas/Link" } }, "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?