Creates an iModel. There are three different ways to create an iModel.
Create an empty iModel
To create an empty iModel do not provide template
and baselineFile
properties.
Create an iModel from an existing iModel
To create an iModel from another iModel provide template
property. The server will apply changesets up to the one specified by changesetId
property to the source iModel file and use it as a Baseline File for the newly created iModel. User must have imodels_read
permissions to the source iModel. Source and target iTwins must be in the same data center.
Create an iModel using a Baseline File.
Creating an iModel using a Baseline File allows to upload a custom iModel file that will become the base file of the created iModel. There are three steps in creating an iModel from a Baseline File:
-
Create a new iModel and provide
baselineFile
property. It is important to provide correct file size or the iModel creation will fail in the later steps. -
Upload Baseline File to blob storage using
upload
property link from the response of iModel creation.
Request syntax:
PUT upload HTTP/1.1
Request headers:
x-ms-blob-type: BlockBlob
- Complete the iModel creation by confirming that Baseline File was uploaded successfully. See Complete iModel Baseline Upload operation for the documentation.
iModel initialization
When creating an empty iModel it will be initialized immediately. When creating an iModel using template
or baselineFile
properties initialization will be scheduled and it's state is reflected in the state
property. For a more detailed information about initialization state see Get iModel Baseline File operation.
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 the imodels_manage
permission assigned at the iTwin level or be an Organization Administrator for the Organization that owns a given iTwin.
For more information please refer to Account Administrator documentation section on Access Control API documentation page.
Rate limits
This operation has a lower rate limit than the rest of iModels API operations. If an application exceeds the rate limit it will receive an HTTP error code 429 "Too Many Requests". The error response includes a Retry-After header that indicates how long clients should wait before retrying.
---
Was this page helpful?