Table of contents
iModels
Download API definition:
GET https://qa-api.bentley.com/imodels/{id}

Retrieves the metadata of an iModel.

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

Name
Required?
Description
id
Yes

iModel id

Request headers

Name
Required?
Description
Authorization
Yes

OAuth access token with itwin-platform scope

Accept
Yes

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

Response 200 OK

OK

json
{
    "iModel": {
        "id": "5e19bee0-3aea-4355-a9f0-c6df9989ee7d",
        "displayName": "Sun City Renewable-energy Plant",
        "dataCenterLocation": "East US",
        "name": "Sun City Renewable-energy Plant",
        "description": "Overall model of wind and solar farms in Sun City",
        "state": "initialized",
        "createdDateTime": "2020-10-20T10:51:33Z",
        "lastChangesetPushDateTime": null,
        "iTwinId": "5e19bee0-3aea-4355-a9f0-c6df9989ee7d",
        "isSecured": false,
        "extent": {
            "southWest": {
                "latitude": 46.1326770283481,
                "longitude": 7.67212000993845
            },
            "northEast": {
                "latitude": 46.3027639547812,
                "longitude": 7.83554164079782
            }
        },
        "_links": {
            "creator": {
                "href": "https://api.bentley.com/imodels/5e19bee0-3aea-4355-a9f0-c6df9989ee7d/users/42101fba-847a-4f4e-85a8-a4bed89065e4"
            },
            "changesets": {
                "href": "https://api.bentley.com/imodels/5e19bee0-3aea-4355-a9f0-c6df9989ee7d/changesets"
            },
            "namedVersions": {
                "href": "https://api.bentley.com/imodels/5e19bee0-3aea-4355-a9f0-c6df9989ee7d/namedversions"
            }
        }
    }
}

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 404 Not Found

Specified iModel was not found.

json
{
    "error": {
        "code": "iModelNotFound",
        "message": "Requested iModel 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.

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

Hyperlink container.

Name
Type
Description
href
String

Hyperlink to the specific entity.

Point

A point on the Earth specified by a latitude and longitude.

Name
Type
Description
latitude
Double

Latitude. Latitude ranges between -90 and 90 degrees, inclusive.

longitude
Double

Longitude. Longitude ranges between -180 and 180 degrees, inclusive.

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.

Name
Type
Description
southWest
northEast

iModel Links

Hyperlinks to related data which complements this entity.

Name
Type
Description
creator
changesets
namedVersions

iModel state

Indicates the state of the iModel. Possible values: 'initialized', 'notInitialized'.

Name
Type
Description
initialized
String
notInitialized
String

iModel

Full representation of the iModel.

Name
Type
Description
id
String

Id of the iModel

displayName
String

Display name of the iModel. Corresponds to Name property.

dataCenterLocation
String

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
String

Name of the iModel.

description
String, null

Description of the iModel.

createdDateTime
Date-time

Date when the iModel was created.

iTwinId
String

Id of the iTwin that iModel belongs to.

isSecured
Boolean

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
iModel state

Indicates the state of the iModel. Possible values: 'initialized', 'notInitialized'.

containersEnabled
Integer

Technology Preview property. Reserved for internal use only.

lastChangesetPushDateTime
Date-time, null

Date when the latest changeset was pushed to the iModel. This field is only set when at least one changeset has been pushed to the main branch. Null if no changeset has been pushed yet.

Error

Contains error information.

Name
Type
Description
code
String

One of a server-defined set of error codes.

message
String

A human-readable representation of the error.

target
String, null

The target 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

iModel Response

Container for iModel object.

Name
Type
Description
iModel

Was this page helpful?