Learning > imodelhub > imodels > Get iModel Edit this page Getting iModel To work with iModelHub, you have to know your iModel's id. Most iModelHub requests will ask for an iModel id and you can specify it from by providing HubIModel.wsgId property. If you do not have an iModel for your Project yet, you first have to create it. If iModel is already created, its HubIModel instance can be retrieved by querying iModels: export async function getIModelId(requestContext: AuthorizedClientRequestContext, projectId: string): Promise<string | undefined> { const client = new IModelHubClient(); const imodels = await client.iModels.get(requestContext, projectId); return imodels ? imodels[0].wsgId : undefined; } Last Updated: 11 June, 2024