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

Returns latest Checkpoint for an iModel. Checkpoint is a pre-processed iModel baseline file that has changes up to a certain Changeset already applied and is stored on the server. This can be used to reduce number of Changesets needed to apply to get to a certain version of the iModel.

A Checkpoint is generated when a Named Version is created for that changeset.

Checkpoint can be stored in two different ways:

  1. download property will have a storage link to a full .bim file that has changes applied up to the Changeset specified by changesetIndex and changesetId properties.
  2. containerAccessInfo (Deprecated: use directoryAccessInfo instead.) will have an access key to Azure Blob container that stores the Checkpoint in 4 MB blocks if Azure Blob storage is used. Important: This property should only be used by iTwin.js libraries.
  3. directoryAccessInfo will have information required to access Azure Blob container or Google Cloud storage folder that stores the Checkpoint in 4 MB blocks. Important: This property should only be used by iTwin.js libraries.

A successfully generated Checkpoint will have at least one of these properties.

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_read 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_read 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
{
    "checkpoint": {
        "changesetIndex": 1,
        "changesetId": "a1ecbdc8c4f6173004f9f881914a57c5511a362b",
        "dbName": "a1ecbdc8c4f6173004f9f881914a57c5511a362b.bim",
        "state": "successful",
        "containerAccessInfo": {
            "account": "imodelhubstorage",
            "sas": "?sv=2019-07-07&sr=b&sig=**removed**&st=2021-07-30T10%3A53%3A09.5224547Z&se=2021-07-30T11%3A13%3A09.5224552Z&sp=r",
            "container": "imodelblocks-5e19bee0-3aea-4355-a9f0-c6df9989ee7d",
            "dbName": "a1ecbdc8c4f6173004f9f881914a57c5511a362b.bim"
        },
        "directoryAccessInfo": {
            "storageType": "azure",
            "baseUrl": "https://example.com/",
            "baseDirectory": "imodelblocks-5e19bee0-3aea-4355-a9f0-c6df9989ee7d",
            "storage": "imodelhubstorage",
            "azure": {
                "sasToken": "?sv=2019-07-07&sr=b&sig=**removed**&st=2021-07-30T10%3A53%3A09.5224547Z&se=2021-07-30T11%3A13%3A09.5224552Z&sp=r"
            },
            "google": null
        },
        "_links": {
            "download": {
                "storageType": "azure",
                "href": "https://example.com/imodelhub-5e19bee0-3aea-4355-a9f0-c6df9989ee7d/5e19bee0-3aea-4355-a9f0-c6df9989ee7d.bim?sv=2019-07-07&sr=b&sig=**removed**&st=2021-07-30T10%3A53%3A09.5224547Z&se=2021-07-30T11%3A13%3A09.5224552Z&sp=r"
            }
        }
    }
}

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 or Checkpoint was not found.

json
{
    "error": {
        "code": "iModelNotFound",
        "message": "Requested iModel is not available."
    }
}

Response 409 Conflict

iModel is not initialized.

json
{
    "error": {
        "code": "iModelNotInitialized",
        "message": "iModel is not initialized."
    }
}

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.

Checkpoint Response

Container for Checkpoint object.

Name
Type
Description
checkpoint

Checkpoint properties.

Checkpoint state

Indicates the state of the Checkpoint. successful - Checkpoint is successfully generated. scheduled - Checkpoint generation is scheduled or already in progress. failed - Checkpoint generation has failed. notGenerated - Checkpoint was not generated.

Name
Type
Description
successful
String
scheduled
String
failed
String
notGenerated
String

Checkpoint

Metadata of a Checkpoint.

Name
Type
Description
id
String

Id of the Checkpoint.

displayName
String

Display name of the Checkpoint. Corresponds to changesetIndex property.

dbName
String

Name of the Checkpoint file that can be accessed through directoryAccessInfo.

changesetIndex
Int64

Index of the target changeset.

changesetId
String, null

Id of the target changeset.

Checkpoint state

Indicates the state of the Checkpoint. successful - Checkpoint is successfully generated. scheduled - Checkpoint generation is scheduled or already in progress. failed - Checkpoint generation has failed. notGenerated - Checkpoint was not generated.

containerAccessInfo

DEPRECATED: use directoryAccessInfo instead. Contains information required to access an Azure Blob storage container. Will only be present if Azure storage is used. In the case of Google Cloud storage this property will be null. Important: This property should only be used by iTwin.js libraries.

directoryAccessInfo

Contains information required to access a storage directory. Important: This property should only be used by iTwin.js libraries.

_links

Contains the hyperlinks to the related data of the Checkpoint.

Container Access Information

Contains information required to access an Azure Blob storage container.

Name
Type
Description
account
String

Name of the account.

container
String

Name of the container.

sas
String

Shared access signature.

dbName
String

Database name.

Directory Access Information storageType

Storage type. Possible values: azure - Azure Blob storage, google - Google Cloud storage.

Name
Type
Description
azure
String
google
String

Directory Access Information

Contains information required to access a storage directory.

Name
Type
Description
Directory Access Information storageType

Storage type. Possible values: azure - Azure Blob storage, google - Google Cloud storage.

baseUrl
String

Base url to be used to access the storage directory.

baseDirectory
String

Container name in case of Azure Blob storage. Folder name in case of Google Cloud storage.

storage
String

Storage account name in case of Azure Blob storage. Bucket name in case of Google Cloud storage.

azure

Contains additional information required to access an Azure Blob storage container. Will only be present if storageType property is set to azure.

google

Contains additional information required to access an Google Cloud storage bucket. Will only be present if storageType property is set to google.

Azure Directory Access Information

Contains additional information required to access an Azure Blob storage container.

Name
Type
Description
sasToken
String

Shared access signature token that should be used as part of the query parameters when accessing the storage container.

Google Directory Access Information

Contains additional information required to access a Google Cloud storage bucket.

Name
Type
Description
authorization
String

Value of authorization header that should be used when accessing the storage bucket.

Checkpoint Links

Hyperlinks to Checkpoint related data.

Name
Type
Description
download

Link to download Checkpoint File from storage.

CloudStorageLink storageType

Storage type. Possible values: azure - Azure Blob storage, google - Google Cloud storage.

Name
Type
Description
azure
String
google
String

CloudStorageLink

Hyperlink container.

Name
Type
Description
href
String

Hyperlink to cloud storage.

CloudStorageLink storageType

Storage type. Possible values: azure - Azure Blob storage, google - Google Cloud storage.

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

Error information.

Was this page helpful?