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

Returns the information about iModel creation process.

This endpoint should be used to check if iModel creation completed.

Forked and cloned iModels

When an iModel is a clone, the clonedFrom response entity property will contain information about the source iModel from which this iModel was created, otherwise it will be null. For more information on iModel cloning please refer to the Clone iModel operation documentation.

When an iModel is a Fork, the forkedFrom response entity property will contain information about the source iModel from which this iModel was created, otherwise it will be null. For more information on iModel forking please refer to the Fork iModel operation documentation.

To get the details of the source iModel use Get iModel Details operation with id value taken from clonedFrom.iModelId or forkedFrom.iModelId.

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 and 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.

An Organization Administrator must have at least one of the following roles assigned in User Management: Account Administrator, Co-Administrator, or CONNECT Services Administrator. For more information about User Management please visit our Bentley Communities Licensing, Cloud, and Web Services wiki 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
In
Required?
Description
id
template
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
{
    "createOperation": {
        "state": "scheduled",
        "clonedFrom": {
            "iModelId": "5e19bee0-3aea-4355-a9f0-c6df9989ee7d",
            "changesetId": "13a61888798b687d41f7c748d7414b428766281f"
        },
        "forkedFrom": null
    }
}

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 user has sent too many requests in a given amount of time.

json
{
    "error": {
        "code": "TooManyRequests",
        "message": "More requests were received than the subscription rate-limit allows."
    }
}

Response headers

Name
Description
retry-after

The number of requests exceeds the rate-limit for the client subscription.

Create iModel Operation Response

Container for Create iModel Operation object.

TableSchema
Name
Type
Description
iModel

Create iModel Operation.

Create iModel operation

Information about iModel creation process.

TableSchema
Name
Type
Description
state
String

Indicates the current state of the iModel creation process. 'successful' - iModel creation process completed successfully. 'waitingForFile' - iModel is being created from a Baseline File and the file upload to file storage has not been completed yet. scheduled - iModel creation process is scheduled or in progress. This means that the iModel was created using one of the following methods that require background processing: creating an iModel from Baseline File, cloning an iModel, creating an iModel from template. failed - iModel creation process failed.

clonedFrom

Information about the source iModel of an iModel clone. If the iModel is not created using Clone iModel operation, the value of this property will be null.

forkedFrom

Information about the source iModel of an iModel Fork. If the iModel is not created using Fork iModel operation, the value of this property will be null.

Cloned From

Information about the source iModel of an iModel clone. This information will only be returned for iModels created using [Clone iModel](https://developer.bentley.com/apis/imodels-v2/operations/clone-imodel/) operation.

TableSchema
Name
Type
Description
iModelId
String

Id of the source iModel.

changesetId
String

Id of the latest source iModel Changeset which was copied to this iModel. This corresponds to the Changeset specified in changesetId or changesetIndex properties when cloning an iModel. If changesetId is an empty string it means that no Changesets were copied from the source iModel to this one, only iModel Baseline.

Forked From

Information about the source iModel of an iModel Fork. This information will only be returned for iModels created using [Fork iModel](https://developer.bentley.com/apis/imodels-v2/operations/fork-imodel/) operation.

TableSchema
Name
Type
Description
iModelId
String

Id of the source iModel.

changesetId
String

Id of the latest source iModel Changeset which was copied to this iModel. This corresponds to the Changeset specified in changesetId or changesetIndex properties when forking an iModel. If changesetId is an empty string it means that no Changesets were copied from the source iModel to this one, only iModel Baseline.

relationshipId
String

Id of the Relationship entity that links source and Fork iModels.

Error

Contains error information.

TableSchema
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

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.

TableSchema
Name
Type
Description
error

Error information.