Skip to content

Sample iModels

iTwin Studio has support for providing sample iModels in your app.

Sample iModels can be enabled with the sampleIModels key in app.config.json.

The id of the iTwin to be used as a sample iModels container should be provided via the iTwinId property.

The key used to fetch the sample iModels should be provided via the shareKey property. There are multiple ways to create this key:

  1. (Recommended) Use the Create share key command of the Studio CLI.
  2. Use the Create iTwin Share endpoint. The iTwinStudioSamples contract should be used when creating the share key, otherwise some endpoints necessary for this feature won’t work.

The config also supports a qa object which will be used when working in a QA environment.

Here is a sample configuration from app.config.json:

"sampleIModels": {
"enabled": true,
"iTwinId": "your-prod-itwin-id-here",
"shareKey": "your-prod-share-key-here",
"qa": {
"enabled": true,
"iTwinId": "your-qa-itwin-id-here",
"shareKey": "your-qa-share-key-here"
}
}