Complete iModel creation from Baseline File by confirming that file was uploaded to file storage.
Baseline File is the base iModel file that does not have any changesets applied. For creating an iModel from a custom Baseline File see Create iModel using a Baseline File.
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
All iTwin Platform API operations have a rate limit. For more documentation on that visit Rate limits and quotas page.
Request parameters
iModel Id
Request headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v2+json
is recommended.
Response 200 OK
OK
{ "baselineFile": { "id": "5e19bee0-3aea-4355-a9f0-c6df9989ee7d", "displayName": "5e19bee0-3aea-4355-a9f0-c6df9989ee7d.bim", "fileSize": 12563, "state": "initializationScheduled", "_links": { "creator": { "href": "https://api.bentley.com/imodels/5e19bee0-3aea-4355-a9f0-c6df9989ee7d/users/42101fba-847a-4f4e-85a8-a4bed89065e4" }, "download": 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.
{ "error": { "code": "HeaderNotFound", "message": "Header Authorization was not found in the request. Access denied." } }
Response 403 Forbidden
User is not authorized to complete Baseline File upload.
{ "error": { "code": "InsufficientPermissions", "message": "The user has insufficient permissions for the requested operation." } }
Response 404 Not Found
Specified iModel was not found, it does not have an associated Baseline File entity or the file was not uploaded to the storage.
{ "error": { "code": "iModelNotFound", "message": "Requested iModel is not available." } }
Response 409 Conflict
File size specified during iModel creation does not match the actual file size of the uploaded file.
{ "error": { "code": "DataConflict", "message": "File size provided during iModel creation does not match actual file size." } }
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 complete Baseline File upload.", "details": [{ "code": "InvalidChange", "message": "Baseline File upload is not in progress." }] } }
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.
Baseline File Response
Container for Baseline File object.
{ "type": "object", "title": "Baseline File Response", "description": "Container for Baseline File object.", "properties": { "baselineFile": { "$ref": "#/components/schemas/BaselineFile", "description": "Baseline File properties." } }, "additionalProperties": false }
Baseline File state
Indicates the state of the Baseline File. 'initialized' - Baseline File is initialized. 'initializationScheduled' - Baseline File creation is complete and initialization is scheduled or currently in progress. 'waitingForFile' - file upload to file storage hasn't been completed yet. 'initializationFailed' - initializing Baseline File failed. 'fileIsBriefcase' - file is not a standalone iModel and cannot be used as a Baseline File.
{ "type": "string", "description": "Indicates the state of the Baseline File. 'initialized' - Baseline File is initialized. 'initializationScheduled' - Baseline File creation is complete and initialization is scheduled or currently in progress. 'waitingForFile' - file upload to file storage hasn't been completed yet. 'initializationFailed' - initializing Baseline File failed. 'fileIsBriefcase' - file is not a standalone iModel and cannot be used as a Baseline File.", "enum": [ "initialized", "initializationScheduled", "initializationFailed", "waitingForFile", "fileIsBriefcase" ], "title": "Baseline File state" }
Baseline File
Metadata of Baseline File of the iModel.
Id of the Baseline File.
Name of the Baseline File.
Size of the Baseline File in bytes.
Indicates the state of the Baseline File. 'initialized' - Baseline File is initialized. 'initializationScheduled' - Baseline File creation is complete and initialization is scheduled or currently in progress. 'waitingForFile' - file upload to file storage hasn't been completed yet. 'initializationFailed' - initializing Baseline File failed. 'fileIsBriefcase' - file is not a standalone iModel and cannot be used as a Baseline File.
{ "type": "object", "title": "Baseline File", "description": "Metadata of Baseline File of the iModel.", "properties": { "id": { "type": "string", "description": "Id of the Baseline File." }, "displayName": { "type": "string", "description": "Name of the Baseline File." }, "fileSize": { "type": "integer", "format": "int64", "description": "Size of the Baseline File in bytes." }, "state": { "type": "string", "description": "Indicates the state of the Baseline File. 'initialized' - Baseline File is initialized. 'initializationScheduled' - Baseline File creation is complete and initialization is scheduled or currently in progress. 'waitingForFile' - file upload to file storage hasn't been completed yet. 'initializationFailed' - initializing Baseline File failed. 'fileIsBriefcase' - file is not a standalone iModel and cannot be used as a Baseline File.", "enum": [ "initialized", "initializationScheduled", "initializationFailed", "waitingForFile", "fileIsBriefcase" ], "title": "Baseline File state", "$ref": "#/components/schemas/BaselineFile-state" }, "_links": { "$ref": "#/components/schemas/BaselineFileLinks", "description": "Contains the hyperlinks to the related data of the Baseline File." } }, "additionalProperties": false }
Baseline File Links
Hyperlinks to Briefcase related data.
Link to download Baseline File from storage. Set only if the user has at least imodels_read
permission, otherwise it is always set to null.
{ "type": "object", "title": "Baseline File Links", "description": "Hyperlinks to Briefcase related data.", "properties": { "creator": { "$ref": "#/components/schemas/Link", "description": "Information about the creator of the Baseline File." }, "download": { "$ref": "#/components/schemas/CloudStorageLink", "description": "Link to download Baseline File from storage. Set only if the user has at least `imodels_read` permission, otherwise it is always set to null.", "nullable": true } }, "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 }
CloudStorageLink storageType
Storage type. Possible values: azure
- Azure Blob storage, google
- Google Cloud storage.
{ "type": "string", "description": "Storage type. Possible values: `azure` - Azure Blob storage, `google` - Google Cloud storage.", "enum": [ "azure", "google" ], "title": "CloudStorageLink storageType" }
CloudStorageLink
Hyperlink container.
Hyperlink to cloud storage.
Storage type. Possible values: azure
- Azure Blob storage, google
- Google Cloud storage.
{ "type": "object", "nullable": true, "description": "Hyperlink container.", "properties": { "href": { "type": "string", "description": "Hyperlink to cloud storage." }, "storageType": { "type": "string", "description": "Storage type. Possible values: `azure` - Azure Blob storage, `google` - Google Cloud storage.", "enum": [ "azure", "google" ], "title": "CloudStorageLink storageType", "$ref": "#/components/schemas/CloudStorageLink-storageType" } }, "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?